First, let's create the REST API by using AWS CLI commands. We will not show how to use the commands that we already discussed in previous recipes. However, the complete commands will be available in the code files:
- Create a REST API in API Gateway by using the apigateway sub-command create-rest-api.
- Get the root resource (/) of our API by using the apigateway sub-command get-resources.
- Create our path-part, lambdagreeting, by using the apigateway sub-command create-resource.
- Create a POST method by using the apigateway sub-command put-method.
- Set a response status code for our POST method by using the apigateway sub-command put-method-response.
- Execute the aws apigateway put-integration command with the ...