December 2019
Intermediate to advanced
382 pages
9h 43m
English
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 ...