1

I've provisioned a lambda function successfully using Terraform. However, I noticed that there's no attributes under aws_lambda_function that allows me to define test events; Just to be clear, the "tests" I am referring to are JSON that I can define by clicking the "test" button in AWS Lambda console to simulate an event.

Is it possible to define tests events using Terraform scripts? If it is not possible, what other options do I have other than manually adding them via AWS Lambda console?

2 Answers 2

5

When the question was posted, I did not know the correct term to search for. The correct term is "lambda events".

A quick search shows a similar question has been raised 3 years ago.

The short answer is this is not possible at this time as there is no AWS API that supports this functionality which is what the Terraform AWS Provider is limited by.

Sign up to request clarification or add additional context in comments.

Comments

0

This looks to be the closest thing I could find on Terraform documentation: Lambda invocation.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.