AWS Certified Alexa Skill Builder – Specialty — Question 10
An Alexa Skill Builder is developing a custom skill and needs to verify that the correct slot values are being passed into the AWS Lambda function.
According to best practices, what is the MOST efficient way to capture this information?
Answer options
- A. Add a logging statement to write the event request to Amazon CloudWatch Logs.
- B. Add an API call to write the environment variables to an Amazon S3 bucket when the function is invoked.
- C. Add an API call to read the event information from AWS Cloud Trail logs and add a PutObject API call to write to an Amazon S3 bucket.
- D. Add a statement to parse the JSON request and save to the local disk for the Lambda function
Correct answer: D
Explanation
The correct answer is D because parsing the JSON request and saving it locally allows for easy access to the specific slot values during the execution of the Lambda function. Options A, B, and C involve external logging or storage, which may not provide immediate access to the information needed for debugging the slot values.