Prerequisites
Create an IAM user with admin access. The IAM user you associate with the AWS CLI should have admin permissions, including the ability to create IAM roles.
Configure the AWS CLI to use the admin user.
- Create a new bucket using the following AWS CLI command:
aws s3 mb s3://<bucket-name>
- Replace the s3-bucket argument with the name of S3 bucket.
aws cloudformation package \
--template-file serverless.cfn.yml \
--output-template-file serverless-xfm.cfn.yml \
--s3-bucket <bucket-name>
- Deploy, replace the template-file argument with the full path to the output template file.
aws cloudformation deploy \
--template-file <path-to-file/serverless-xfm.cfn.yml> \
--stack-name StartupKitServerless \
--capabilities CAPABILITY_IAM
In API Gateway console, selecting the StartupKitServerless API, then Stages in the left navigation panel, and finally Stage in the list of stages. The invoke URL should now appear at the top of the right hand panel.
curl -X POST -H 'Content-Type: application/json' -d '{"todo_id": "1001", "active": true, "description": "What TODO next?"}' https://<API-URL>/todo/new
- To fetch the active TODO items
curl https://<API-URL>/todo/active