Tag Archives: AWS SAM

AWS 2_ContinuousDeliveryPipeline Tutorial – Error: no test specified

Hi everyone,

I ran into the following error while completing an AWS tutorial: https://github.com/aws-samples/aws-serverless-workshops/tree/master/DevOps/2_ContinuousDeliveryPipeline

C:UsersChris-PCsourcereposUniApiuni-apitest>npm test

> uni-api-test@1.0.0 test C:UsersChris-PCsourcereposUniApiuni-api
> echo ‘Error: no test specified’

‘Error: no test specified’

The solution was to add the following line to my package.json file:

“scripts”: {“test”: “mocha”}

Now when running npm test I get the expected test output:

4 passing (24ms)
1 failing

1) Reading Unicorns
errors on missing unicorn data:

AssertionError [ERR_ASSERTION]: 500 == 404
+ expected – actual


at lambda.lambda_handler (testread.spec.js:77:20)
at appread.js:20:10
at Object.get (testread.spec.js:34:33)
at Object.exports.lambda_handler (appread.js:18:13)
at Context. (testread.spec.js:65:16)

npm ERR! Test failed. See above for more details.

Thanks to this link for the answer: https://teamtreehouse.com/community/when-i-run-test-i-am-getting-an-error-that-says-no-test-specified


FAILED. Reason: Requires capabilities : [CAPABILITY_IAM] – AWS SAM

Hi everyone,

I ran into an error today while trying to deploy using AWS SAM:

aws cloudformation deploy –template-file C:Usersxxxserverless-output.yaml –stack-name events-app
Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Requires capabilities : [CAPABILITY_IAM]

The solution is pretty straightforward. You need to explicitly add –capabilities CAPABILITY_IAM to you command:

aws cloudformation deploy --template-file C:Usersxxxserverless-output.yaml --stack-name events-app --capabilities CAPABILITY_IAM>

Thanks to Bfreis for his comment on this github issue: https://github.com/awslabs/serverless-application-model/issues/51