Cloud formation Stacks creating and deploying fail S3 access error.

0

With the help of template I am trying create and deploy the NodeJs API. I packaged the code with cloud formation package command into S3 bucket dev-srv and trying to deploy with cloud formation deploy command but the stacks are failing with error message failed to create nested Stack and s3 bucket not accessible.

The template file I am creating is working fine with my previous stacks. Old stacks are updating but not able to create new one.

Following are the cloud formation event message:

  1. S3 error: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
  2. The following resource(s) failed to create: [UserStack, AdminStack]. Rollback requested by user.

When I am clicking the template URL (from s3 bucket) used in yaml file it's downloading. Means file is accessible and present still facing this issue.

Following is the command I am using to package and deploy.

aws cloudformation deploy --template-file out.yaml --capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND --stack-name lambda --s3-bucket dev-srv --profile dev

aws cloudformation package --template-file tpmain.yaml --output-template-file out.yaml --s3-bucket dev-srv --profile dev

Kindly do the needful as soon as possible.

Solved with cross deployment like s3 bucket from another region(let's say A) used to deploy nested stacks in region B.

UPDATE: I am able to create the stacks and API gateway. Deployment successful but not able to access the REST API from front end /postman. In route 53 custom domain registered with CNAME and mentioned API Gateway domain name. Error in console: net::ERR_NAME_NOT_RESOLVED

1개 답변
2
수락된 답변

Hello.

What CloudFormation template are you using?
Also, will it work by deploying CloudFormation in the same region as S3?
I think the GitHub issue below is related to your problem.
https://github.com/aws/aws-cli/issues/4512

I think you can avoid the error by creating an S3 bucket in the same region or deploying CloudFormation in the same region as the S3 bucket.

profile picture
전문가
답변함 5달 전
profile picture
전문가
검토됨 15시간 전
profile picture
전문가
검토됨 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠