Objectives
Lab Details
  1. Create a Lambda function named FAQ. You can use the default Node.js runtime and default execution role.
  2. Use the code from faq.js as your source code for the function definition.
  3. Test the function by clicking Test and configuring a new test. Delete the keys and values and leave an empty object. Create and run the test to verify that your Lambda function is working properly.

    Take a screenshot of the test results.

  4. To allow access to your Lambda function from external sources outside of AWS, you are going to create an API Gateway endpoint. Click on the Add trigger within Lambda and configure the trigger as follows. When finished with the configuration, click theAdd option to create the API Gateway endpoint.
    • Select a trigger: API Gateway
    • API: Create a new API
    • Choose a template: Rest API
    • Security: Open
    • API name: FAQ-API
    • Deployment stage: matcDemo

    Take a screenshot of the trigger configuration.

  5. Access your FAQ-API within a browser to verify that it works. You will need to get the API Gateway endpoint URL from API Gateway.

    Take a screenshot of API Gateway results in a browser. Make sure the screenshot includes the browser url as well as the data results.

  6. Back in Lambda, select your FAQ function and click on theMonitoring tab. Verify that activity within the CloudWatch logs to make sure that it matches your use of your services

    Take a screenshot of your CloudWatch log data.

  7. After completing the lab (submit the screenshots requested in the assignment submission link) and getting credit in the GradeCenter, delete the Lambda function and API Gateway resources to avoid being billed.
What did I learn?