S3 Error: Access Denied When Deploying Cfn Template with Nested Stacks

S3 Error: Access Denied When Deploying Cfn Template with Nested Stacks

I am trying to launch a CFN templated, Nested Stack. The child stack is in a bucket in the same region as the parent I am trying to launch via CFN console.

I have Administrator Access and am able to create the resources via a single CFN template, but for some reason, when using nested stacks the follow error is returned:

The following resource(s) failed to create: [My-Sns-Stack]. . Rollback requested by user.
My-Sns-Stack    CREATE_FAILED   S3 error: Access Denied For more information check 

I've checked the following resources, but doesn't resolve the issue:

Specifying an S3 bucket when deploying a cloudformation template

...
    Resources:
        SnsStack:
            Type: AWS::CloudFormation::Stack
            Properties:
                TemplateURL: !Ref SnsStackUrl
                TimeoutInMinutes: 15
...
2

2 Answers

I found this error less than useful as I assumed it was to with the CloudFormation template not having access to the S3 resources referenced within in. Turns out it was more simple and the 'Access Denied' error was actually indicating the S3 file containing my CloudFormation template was not found. Within the reference to my nested CloudFormation stack, the TemplateURL: had a typo.

3

Apart from the above answers, please ensure that the role we're using for the deployment is having the S3 access permission to that S3 or template S3 URL(in case of nested stacks) our Cloud formation yml(template code) is referring to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.