Search code examples
amazon-ecs

CodeBuild unable to fetch an S3 object despite having Administrator Access


I am unable to do a code build due to this error. I could not make any sense of this error.

It is suppose to use aws/codebuild/docker:17.09.0 to build me a docker image to be pushed to ECS. Please help

enter image description here


Solution

  • I assume you are using VPC configuration for this project. Please check if the private subnet provided to CodeBuild had a NAT (can access Internet) or you have an s3 VPC endpoint set up for this. To confirm that VPC configuration is the issue, you can run a build with no VPC, before troubleshooting the VPC's route to access s3 for your builds.