You create an API Gateway REST API with a resource path /items and add a GET method integrated with a Lambda function. What happens when a client sends a POST request to /items?
Think about how API Gateway handles HTTP methods that are not explicitly configured on a resource.
API Gateway only allows HTTP methods that are explicitly defined on a resource. If a client sends a request with an undefined method, API Gateway returns a 405 Method Not Allowed error.
You want to design an API Gateway REST API that supports two versions: v1 and v2. Which resource structure best supports this versioning?
Consider how resource paths can represent different API versions clearly.
Using separate resource paths like /v1 and /v2 clearly separates versions and allows independent method configurations for each version.
You configure a POST method on a resource in API Gateway and set the authorization type to IAM. What must a client do to successfully invoke this method?
Think about how IAM authorization works with API Gateway methods.
When IAM authorization is enabled, clients must sign their requests using AWS Signature Version 4 with valid AWS credentials to be authorized.
You want to create a GET method on a resource that returns a fixed JSON response without calling any backend. Which integration type should you configure?
Consider how to return a response directly from API Gateway without backend calls.
MOCK integration allows API Gateway to return a response directly using mapping templates without invoking any backend service.
You want to enable caching for a GET method on a resource but only cache responses when the query parameter type is present. How should you configure caching keys?
Think about how API Gateway cache keys can be customized to include specific request parameters.
API Gateway allows specifying which request parameters are used as cache keys. Including only method.request.querystring.type caches responses based on that parameter.