npm run start
npm run test
A launch config for the test cases(Mocha tests) has been added. In the visual studio code debug pane, make sure the above launch config is selected and then hit the green play button.
serverless deploy --stage dev --region ap-south-1
Webhook Event Type: PUSH
Start a build under these conditions: HEAD_REF = refs/heads/master
Environment Image: AWS Managed > Ubuntu > Standard Image 2.0
Enable Cloudwatch logs
- AWSLambdaFullAccess
- AmazonS3FullAccess
- AmazonDynamoDBFullAccess
- CloudFrontFullAccess
- CloudWatchLogsFullAccess
- AmazonAPIGatewayAdministrator
- AmazonRoute53FullAccess
- Custom policy for CloudformationReadWriteAccess
- Custom policy for managing IAM roles for AWS Lambda
For pt#9 above, following items are needed in the custom policy:
"Effect": "Allow",
"Action": [
"iam:GetRole",
"iam:PassRole",
"iam:CreateRole",
"iam:DeleteRole",
"iam:DetachRolePolicy",
"iam:PutRolePolicy",
"iam:AttachRolePolicy",
"iam:DeleteRolePolicy"
]
...
- Open
serverless.yml, change top line to mention the actual service name, usually, simply change from ${opt:product} toname of your repo.. dont change product name anywhere else - Open
buildspec.yml, add commands for test cases, changeproductin theserverless commandto something more sensible to a higher level product's name for disambuguation of deployed articles