Giter Club home page Giter Club logo

Comments (16)

bfreis avatar bfreis commented on September 13, 2024 287

from serverless-application-model.

brysontyrrell avatar brysontyrrell commented on September 13, 2024 32

@davidwebstar34 For you, switch --capabilities CAPABILITY_IAM to --capabilities CAPABILITY_NAMED_IAM. If you're not letting CloudFormation name your IAM resources you need to pass this capability.

from serverless-application-model.

keetonian avatar keetonian commented on September 13, 2024 28

You may sometimes need multiple capabilities, like when working with nested stacks. You can add multiple capabilities by listing them (separated by a space):
--capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND

See https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html for more information about these capabilities. For most cases, you will only need one of these capabilities.

from serverless-application-model.

manpenaloza avatar manpenaloza commented on September 13, 2024 4

I added the --capabilities CAPABILITY_IAM flag, but still get the the "Access denied" message in my console.

Here's the command I executed:

 aws cloudformation deploy \
   --template-file serverless-output.yaml \
   --stack-name prod \
    --capabilities CAPABILITY_IAM

anytihing else that could cause this? thx for your support!

from serverless-application-model.

piyushchordia avatar piyushchordia commented on September 13, 2024 4

Add --capabilities CAPABILITY_NAMED_IAM
This should fix the issue

from serverless-application-model.

sanathkr avatar sanathkr commented on September 13, 2024 2

adding --capabilities should solve the problem. Let us know if it doesn't

from serverless-application-model.

davidwebstar34 avatar davidwebstar34 commented on September 13, 2024 1

I have the exact same issue when I run create-stack for a cloudformation template that contains IAM policies.

aws cloudformation create-stack --stack-name iam-stack --template-body file://./iam.yml --capabilities CAPABILITY_IAM --profile dev

An error occurred (InsufficientCapabilitiesException) when calling the CreateStack operation: Requires capabilities : [CAPABILITY_NAMED_IAM]

from serverless-application-model.

C-Kenny avatar C-Kenny commented on September 13, 2024 1

Thanks @piyushchordia, CAPABILITY_NAMED_IAM worked for me also.

I ended up with a command like:

AWS_DEFAULT_PROFILE=role_name aws cloudformation create-stack --stack-name stack_name --template-url s3_url/template file --parameters file:///local_params.json --capabilities CAPABILITY_NAMED_IAM

from serverless-application-model.

heijmerikx avatar heijmerikx commented on September 13, 2024 1

Ok, 'funny' this didn't work for me:

sam deploy --config-env default --profile myprofile –-capabilities CAPABILITY_IAM

But this did:

sam deploy --config-env default --capabilities CAPABILITY_IAM --profile myprofile

from serverless-application-model.

avizaviz avatar avizaviz commented on September 13, 2024

Thanks

from serverless-application-model.

bgkpandurang avatar bgkpandurang commented on September 13, 2024

i was also faced this issue ,fixed it by adding --capabilities CAPABILITY_IAM

from serverless-application-model.

shetty-shruti avatar shetty-shruti commented on September 13, 2024

adding --capabilities CAPABILITY_IAM worked for me too. Thanks

from serverless-application-model.

ktajpuri avatar ktajpuri commented on September 13, 2024

adding --capabilities CAPABILITY_IAM fixed the issue for me

from serverless-application-model.

idolice avatar idolice commented on September 13, 2024

i tried CAPABILITY_NAMED_IA & CAPABILITY_IAM, neither work for me, still get the same error message as avizaviz, my cmd is:
aws cloudformation deploy --template-file target/output-sam.yaml --stack-name spring-boot-lambda --capabilities CAPABILITY_IAM
any suggesion?@sanathkr

from serverless-application-model.

abodero avatar abodero commented on September 13, 2024

adding --capabilities CAPABILITY_IAM fixed the issue. thxs

from serverless-application-model.

citizenilustre avatar citizenilustre commented on September 13, 2024

@davidwebstar34 For you, switch --capabilities CAPABILITY_IAM to --capabilities CAPABILITY_NAMED_IAM. If you're not letting CloudFormation name your IAM resources you need to pass this capability.

This was the solution for me, insetead of using CAPABILITY_IAM I used CAPABILITY_NAMED_IAM and it worked.

from serverless-application-model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.