Complete the code to create a REST API Gateway resource named 'MyApi'.
aws apigateway create-rest-api --name [1]The command creates a REST API Gateway resource with the specified name. 'MyApi' is the correct name as per the instruction.
Complete the code to create a resource under the REST API with the path part 'users'.
aws apigateway create-resource --rest-api-id [1] --parent-id abc123 --path-part usersThe REST API ID must be the correct one for the API. 'def456' is the correct ID for this example.
Fix the error in the command to create a GET method for the 'users' resource.
aws apigateway put-method --rest-api-id def456 --resource-id [1] --http-method GET --authorization-type NONEThe resource ID must be the ID of the 'users' resource, which is 'xyz789' in this example.
Fill both blanks to integrate the GET method with a Lambda function named 'UserFunction'.
aws apigateway put-integration --rest-api-id def456 --resource-id xyz789 --http-method GET --type [1] --integration-http-method [2] --uri arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:123456789012:function:UserFunction/invocations
The integration type for Lambda is 'AWS' and the integration HTTP method is 'POST' because Lambda functions are invoked via POST requests.
Fill all three blanks to deploy the API to a stage named 'prod' in region 'us-east-1'.
aws --region [2] apigateway create-deployment --rest-api-id def456 --stage-name [1] --description [3]
The stage name is 'prod', the region is 'us-east-1', and the description is 'Production deployment' to clearly identify the deployment.