Anthony Kong
Anthony Kong

Reputation: 40664

How to inject a value to event parameter to the 'lambda_handler' for testing purpose?

This is the function signature of the lambda_handler of the entry point of an AWS lambda function

 def lambda_handler(event, context):

For testing purpose, I want to be able to include some dummy values in event dictionary.

e.g.

 environment = event['environment']

How can I do it?

Upvotes: 0

Views: 465

Answers (1)

Anthony Kong
Anthony Kong

Reputation: 40664

I can achieve it by creating a test event. For example:

enter image description here

Then I can apply it by using the Test button

Upvotes: 1

Related Questions