Skip to content

Instantly share code, notes, and snippets.

@Lucifergene
Created August 18, 2021 19:01
Show Gist options
  • Save Lucifergene/180738ec994ce28d4b4d8fa7c71bbab7 to your computer and use it in GitHub Desktop.
Save Lucifergene/180738ec994ce28d4b4d8fa7c71bbab7 to your computer and use it in GitHub Desktop.
Intregation Request Mapping Template of POST Method
{
"TableName": "URL-Shortener",
"ConditionExpression": "attribute_not_exists(id)",
"Key": {
"shortId": {
"S": $input.json('$.shortURL')
}
},
"ExpressionAttributeNames": {
"#u": "longURL",
"#o": "owner"
},
"ExpressionAttributeValues": {
":u": {
"S": $input.json('$.longURL')
},
":o": {
"S": $input.json('$.owner')
}
},
"UpdateExpression": "SET #u = :u, #o = :o",
"ReturnValues": "ALL_NEW"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment