Forked from awssimplified/gist:02d7c43a3ed9222312746138181e1af9
Created
March 1, 2023 21:20
-
-
Save kwa1/7d8c9bc2210bde84d443368426895ac2 to your computer and use it in GitHub Desktop.
api gateway service proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DynamoDb Put Item Documentation - https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html | |
| API Gateway Policy | |
| --- | |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "", | |
| "Effect": "Allow", | |
| "Principal": { | |
| "Service": "apigateway.amazonaws.com" | |
| }, | |
| "Action": "sts:AssumeRole" | |
| } | |
| ] | |
| } | |
| DynamoDB - Simple | |
| --- | |
| { | |
| "TableName": "Customers", | |
| "Item": { | |
| "customerId": { | |
| "S": "1" | |
| }, | |
| "date": { | |
| "S": "2020" | |
| }, | |
| "name": { | |
| "S": "John Doe" | |
| } | |
| } | |
| } | |
| DynamoDB - Mapping Template | |
| { | |
| "TableName": "Customers", | |
| "Item": { | |
| "customerId": { | |
| "S": "$context.requestId" | |
| }, | |
| "date": { | |
| "S": "$input.path('$.date')" | |
| }, | |
| "name": { | |
| "S": "$input.path('$.name')" | |
| } | |
| } | |
| } | |
| Stripped Down REST Request | |
| --- | |
| { | |
| "date": "2020", | |
| "name": "Jane Doe" | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment