Vishesh Mehta
Vishesh Mehta

Reputation: 79

Use Path Parameters in serverless framework

 functions:
  update:
    handler: todos/update.update
    events:
      - http:
          path: /update/{title}
          method: put

How do I have to define the path param in order to pass it to my AWS Lambda function using serverless framework?

The language I want to use for lambda is Python3.

Upvotes: 2

Views: 1984

Answers (1)

Arun Kamalanathan
Arun Kamalanathan

Reputation: 8593

This is correct, you can access the parameter you defined in the serverless.yml from event['pathParameters']['title'] inside the lambda.

hope this helps

Upvotes: 5

Related Questions