Skip to Content
Learn AWS Serverless Computing
book

Learn AWS Serverless Computing

by Scott Patterson
December 2019
Intermediate to advanced
382 pages
9h 43m
English
Packt Publishing
Content preview from Learn AWS Serverless Computing

Hello world via the CLI

Next, we're going to extend the API we built in the previous section. We're going to use the command line entirely to create a new method, deploy it to a dev stage, and fire off some test requests. If you haven't created your API key and usage plan yet, go back to the last section and do that before progressing.

Using your AWS CLI, let's create a new POST method under the resource we've already created. Substitute your IDs into the following command:

aws apigateway put-method     --rest-api-id ${api-id}    --resource-id ${resource-id}    --http-method POST    --authorization-type NONE    --api-key-required

This new method should also be connected to the same Lambda function that we're using for our backend. Notice here that we have ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Sunil Gulabani

Publisher Resources

ISBN: 9781789958355