Let's first 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 with the code files:
- Create a REST API with the name API Gateway With Lambda, using the apigateway sub-command create-rest-api.
- Get the parent resource ID passing the REST API by using the apigateway sub-command get-resources.
- Create a resource, lambdagreeting, under the root resource (/) by using the sub-command create-resource.
- Create a path parameter, {name}, under the parent resource lambdagreeting, using the apigateway sub-command create-resource.
- Create an http-method GET with the authorization type ...