Serverless: CloudFormation Config Error

Created on 6 Jun 2016  ·  3Comments  ·  Source: serverless/serverless

I couldn't find a similar issue for this, but my install of serverless doesn't want to play with my AWS account, and it appears to be an issue with CloudFormation.

It's worth noting I have another serverless project on this machine using a profile for an entirely different AWS Company console. Maybe they're clashing.

Here's the full stacktrace:

➜  Sites sls project create
Serverless: Initializing Serverless Project...
Serverless: Enter a name for this project:  (serverless-hyzha4) gamblor
Serverless: Enter a new stage name for this project:  (dev)
Serverless: For the "dev" stage, do you want to use an existing Amazon Web Services profile or create a new one?
  > Existing Profile
    Create A New Profile
Serverless: Select a profile for your project:
  > greenwald_web
Serverless: Creating stage "dev"...
Serverless: Select a new region for your stage:
  > us-east-1
    us-west-2
    eu-west-1
    eu-central-1
    ap-northeast-1
Serverless: Creating region "us-east-1" in stage "dev"...
Serverless: Deploying resources to stage "dev" in region "us-east-1" via Cloudformation (~3 minutes)...
/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:61
        fn = function () { throw arg; };
                           ^

ServerlessError: ServerlessError: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

The Canonical String for this request should have been
'POST
/

host:cloudformation.us-east-1.amazonaws.com
x-amz-content-sha256:a2a7598a25270c66b8240e6b6b79dba162c1cd4f0a4e55a8ae70bcfaa1742f28
x-amz-date:20160606T000717Z

host;x-amz-content-sha256;x-amz-date
a2a7598a25270c66b8240e6b6b79dba162c1cd4f0a4e55a8ae70bcfaa1742f28'

The String-to-Sign should have been
'AWS4-HMAC-SHA256
20160606T000717Z
20160606/us-east-1/cloudformation/aws4_request
162169136a49170309594344c3a2f48851a81a8a4aefd2a0f4eeb5caebd0639c'

    at new ServerlessError (/usr/local/lib/node_modules/serverless/lib/Error.js:17:11)
    at ResourcesDeploy.<anonymous> (/usr/local/lib/node_modules/serverless/lib/actions/ResourcesDeploy.js:242:25)
    at ResourcesDeploy.tryCatcher (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:502:31)
    at Promise._settlePromise (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:559:18)
    at Promise._settlePromise0 (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:604:10)
    at Promise._settlePromises (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:679:18)
    at Async._drainQueue (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)
Serverless Version

serverless version 0.5.5.

Platform

OSX El Capitan

Packages/Dependencies

Perhaps aws-cli? v. 1.10.35

Most helpful comment

if anyone else hits this, i solved it by generating a new key/secret, then creating a new aws profile with

serverless config credentials --provider aws --key 1234 --secret 5678 --profile custom-profile

All 3 comments

Closing as I am no longer using this project for the app in question.

if anyone else hits this, i solved it by generating a new key/secret, then creating a new aws profile with

serverless config credentials --provider aws --key 1234 --secret 5678 --profile custom-profile

@brandonmp thanks for sharing.
I too had to generate a new key and secret.

I am slightly confused why the old one wasnt working.
but thats support ticket to AWS.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gmetzker picture gmetzker  ·  3Comments

davepwsmith picture davepwsmith  ·  3Comments

taptip picture taptip  ·  3Comments

kevindiamond picture kevindiamond  ·  3Comments

cspeer picture cspeer  ·  3Comments