Skip to content

.NET / dotnet script (CSX) execution in AWS CodeBuild not resolving IAM Role for SDK #3724

Answered by skirk-mpr
skirk-mpr asked this question in Q&A
Discussion options

You must be logged in to vote

AWS Support replied back with solution. So it looks like the environmental variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (and AWS_SESSION_TOKEN) are not prepopulated at runtime in CodeBuild with the credentials for the associated IAM Role. There is an additional explicit step need to retrieve those temporary credentials via a request to $AWS_CONTAINER_CREDENTIALS_FULL_URI and then setting them.

Happy to confirm that doing exactly this allows the CSX file to execute successfully picking up the credential material from the environmental variables

Thanks @normj, @dscpinheiro and @filipw for your time, attention and support!

version: 0.2
phases:
  install:
    runtime-versions:
      …

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
5 replies
@skirk-mpr
Comment options

@dscpinheiro
Comment options

@skirk-mpr
Comment options

@skirk-mpr
Comment options

@skirk-mpr
Comment options

Comment options

You must be logged in to vote
3 replies
@skirk-mpr
Comment options

@skirk-mpr
Comment options

@skirk-mpr
Comment options

Answer selected by skirk-mpr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants