User is not authorized to perform: cloudformation:CreateStack

后端 未结 11 1679
天涯浪人
天涯浪人 2021-01-31 01:37

I\'m trying out Serverless to create AWS Lambdas and while creating a project using the command serverless project create I\'m getting the following error.

11条回答
  •  难免孤独
    2021-01-31 01:55

    The closest one that you've mentioned is AWSCloudFormationReadOnlyAccess, but obviously that's for readonly and you need cloudformation:CreateStack. Add the following as a user policy.

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "Stmt1449904348000",
                "Effect": "Allow",
                "Action": [
                    "cloudformation:CreateStack"
                ],
                "Resource": [
                    "*"
                ]
            }
        ]
    }
    

    It's entirely possible you'll need more permissions- for instance, to launch an EC2 instance, to (re)configure security groups, etc.

提交回复
热议问题