Reputation: 121
In an AWS Lambda java code, how can I get the HTTP method (e.g. GET, POST...) of an HTTP request coming from the AWS Gateway API?
Upvotes: 0
Views: 1716
Reputation: 14039
It really depends on your request mapping, that you set within the api-gateway.
If you stick with the default mapping, the following site has a section on how the event structure is formulated: Set up API Gateway Proxy Integration
see section "Input Format of a Lambda Function for Proxy Integration".
so in short.
event.httpMethod
Upvotes: 1