0

I'm new to the serverless framework and I'm taking my first steps using official documentation. And I get stuck with deploying to aws

y700@jekson:~/projects/awstest/numpy-test$ serverless deploy
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Injecting required Python packages to package...

  Serverless Error ---------------------------------------

  User: arn:aws:iam::6644331164204:user/lifeline-s3 is not authorized to perform: cloudformation:DescribeStacks on resource: arn:aws:cloudformation:us-east-1:6644331164204:stack/numpy-test-dev/*

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          linux
     Node Version:              8.10.0
     Framework Version:         1.58.0
     Plugin Version:            3.2.5
     SDK Version:               2.2.1
     Components Core Version:   1.1.2
     Components CLI Version:    1.4.0

In an AWS account, I created a user with name serverless with AdministratorAccess permission and make him serwerless framework default user (serverless config credentials). After I also added a new policy with the following permission:

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

Didn't help.

But it's strange that in traceback writing user/lifeline-s3 and I cant understand where this user came from.

7
  • have you got the aws cli installed on the same machine? If so run aws configure and enter the credentials for the serverless user there too. Commented Nov 29, 2019 at 8:23
  • @KMo I did what you said, but unfortunately the problem is still Commented Nov 29, 2019 at 8:37
  • Try looking in .aws/credentials to see if there are more than one set of credentials and if so, which one is set to default. Commented Nov 29, 2019 at 9:14
  • @KMo Checking, just one record Commented Nov 29, 2019 at 9:18
  • and that one record is set to default? Commented Nov 29, 2019 at 9:33

1 Answer 1

1

The AWS CLI is picking up credentials from either your shell or your ~/.aws/credentials file. If you want to Serverless and AWS to use default, add export AWS_PROFILE=default to your .bashrc or equivalent shell config file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.