rockz
rockz

Reputation: 121

How to get the HTTP method in AWS Lambda in java?

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

Answers (1)

jens walter
jens walter

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

Related Questions