AWS CDK repository authentication
09:56 20 Nov 2025

I'm working on a CDK deployment. I'm trying to set up a stack that creates a ECR image which is completely build the way I want. However, I'm stuck at the part of getting the private repositories which you can add through composer config --global --auth http-basic."$REPOSITORY" "$USERNAME" "$PASSWORD". I have the repo, username and password stored in AWS Secrets Manager. What I'm trying to do is to inject those variables during the build process so I can run a fully initialized application instead of running composer install on each Fargate container. There is no way that I get my secrets in my Docker container. Does anybody has a recommendation?

docker aws-cdk continuous-deployment