Why am i getting this issue "Missing credentials in config" in Assets stage of code pipeline?

39 Views Asked by At

I'm encountering an error during the assets stage of my CI/CD pipeline. The error message indicates a problem with missing AWS credentials while running the cdk-assets command, the code build and self mutate steps before this works fine. enter image description here

1

There are 1 best solutions below

1
Jake Chavis On

I ran into a similar issue but just got this resolved. If you're using a CICD pipeline to publish assets into a different account, for example in a beta/prod setup, you need to make sure that the "file-publishing" role grants access to the AWS account which the CodePipeline is deployed in.

My problem was that my prod account did not grant assume role access to the beta account (which is the account that has the pipeline). Thus, the pipeline was unable to write to the prod account's S3 bucket.

It's annoying that the error isn't an STS Assume Role error, because they don't give us that much information in this error message, but that was the fix for me (simply manually updating the trust policy).