API Gateway

Let’s next setup an API Gateway to invoke the QSGetEmbedUrl Lambda function.

  1. Launch API Gateway, click Create API button, scroll down and click Build button against REST API option.
    First API in your AWS account? Screen are slightly different. Expand for instructions.
AGW
  1. With New API option selected, enter API Name as QSAnonymousEmbedSample and click Create API button.
    First API in your AWS account? Screen are slightly different. Expand for instructions.
AGW
  1. Click Actions button, select Create Resource, set Resource Name to anonymous-embed-sample and click Create Resource button.
AGW
  1. With anonymous-embed-sample resource selected, click Actions button, select Create Method, pick GET from the option box and click the tickmark icon
AGW
  1. With Integration Type as Lambda Function, enable Lambda proxy integration option, search for and select QSAnonymousEmbedSample Lambda function, click Save and click OK on Lambda permission dialog.
AGW
  1. Click Actions button, select Deploy API, pick Deployment stage option [New Stage], enter Stage name as test and click Deploy.
    Copy the Invoke url into your notepad.
AGW
  1. Optional step - Test the GET method for dynamic mode by directly clicking the Test button, for static mode by passing mode=static as query string and for getUrl mode by passing mode=getUrl as query string.
AGW