AWS API Gateway
The AWS API Gateway (http://aws.amazon.com) provides a means to forward event data to AWS services in the cloud for additional processing. Lambda is an amazon service that allows a user to run code on an amazon cluster without needing to set one up.
Log into your amazon account and click the services navigation item in the navigation bar. Then click the lambda option under the compute section.
Once you have entered the lambda section of AWS click the Create a Lambda function button.
Then select the blueprint you wish to use. A blueprint is basically a pre-made lambda function that you can use.
Click on the "Blank Function" tile.
Configure the lambda trigger, this is the method that activates the lambda function. In our case, we support the AWS API gateway.
Now you can configure your function, this part will be based on your implementation.
Once your function is configured, you can review all your changes. Review the configuration and confirm it is correct, hit the create function button at the bottom of the review page. Next you need to configure the API Gateway to use API keys instead AWS IAM. Click on the ANY link (you will need the URL under 'API Gateway' later).
From here click the Method Request link.
Configure the gateway with the following settings (Authorization NONE and API Key Required).
Return to the previous page and then click Integration request.
There, simply disable Lambda proxy integration.
Next you need to make the Usage Plan for the API Gateway.
Now click the Add API Stage Button. After you create it, hit the Next button.
Now hit the 'Create API Key and add to Usage Plan' button. This will launch a dialog that allows you to create an API Key for this usage plan.
Deploy your changes to the API Gateway. Navigate back to the API Gateway.
Using the actions menu, hit deploy API.
Select the correct deployment stage from the dropdown in the resulting dialog and then hit deploy.
Specify the Server Name, Function Name, and API Key into the provided [Notification Target][notify] fields. The URL you grabbed earlier will look like this:
Copy the following segment of the URL into the Server Name field:
then copy the remaing segment of the URL (including the staging area name), shown here, into the Function Name field.
The token is an optional field that is passed through to the AWS API Gateway as a token field. This field is to help give the AWS Lambda function some user defined information.