- Le plus récent
- Le plus de votes
- La plupart des commentaires
Your VPC will need a route to the internet, as the build container uses the same network security group rules as your VPC. You may achieve this by having a NAT Gateway in your public subnet or by running a self-managed proxy with route to the internet through the internet gateway.
https://docs.aws.amazon.com/codebuild/latest/userguide/use-proxy-server.html
To respond to my problem above:
I dug deeper on the AWS documents for PCs, NAT Gateways, and CodeBuild. I finally solve my problem mentioned above. I noticed that the NAT Gateway was attached to a private subnet with the availability zone of us-west-2b. I had to delete it and create a new NAT Gateway and attached it to my public subnet with zone us-west-2a. I did the following steps:
- Delete NAT Gateway attached to a private subnet with zone us-west-2b
- Create NAT Gateway and attach it to a public subnet with zone us-west-2a
- Modified route table for private subnet with zone us-west-2a by adding destination 0.0.0.0/0 with the new NAT Gateway as a target.
- Validate settings successfully
- try to access all my services via VPC and my ALB services and all of it is successful.
Well, even though the solution above fixes my problem with VPC settings validation, I noticed several new problems... To start with, when I push changes to my repo from my local machine the CodePipeline is triggered. It moves into the Build Stage, and CodeBuild kicks off great. There are two scenarios I am dealing with now. First, the Phase DOWNLOAD_SOURCE
is timeout; I increased the timeout time and I still don't get anywhere. Second, if it passes Phase DOWNLOAD_SOURCES
. Code build starts phase PRE_BUILD
, code build runs npm test
and it fails because it could not reach my Redis instance.
Do I need to have a NAT gateway for each public subnet I have?
Contenus pertinents
- demandé il y a un an
- demandé il y a 3 mois
- demandé il y a un an
- demandé il y a 9 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans