SAM Local Testing Quiz

5 questions Pass: 70% +25 pts (50 with Pro)

Quiz covering Testing

What you'll be asked

  1. Which command is used to invoke a Lambda function locally using the AWS SAM CLI?
  2. When testing an API Gateway endpoint locally with 'sam local start-api', what is the default port the service listens on?
  3. How can you provide a custom event JSON file to a Lambda function when using 'sam local invoke'?
  4. What is the primary purpose of the 'sam local generate-event' command?
  5. You are testing a Lambda function that interacts with an external resource. Why might 'sam local invoke' fail even if your code is correct?

Answers and explanations come after you submit.