AWS Lambda Function - polling SQS, making outbound API call, and inserting into DynamoDB -- 2
$30-250 USD
Paid on delivery
We need an AWS Lambda function written in python that will do the following:
1. Read from an AWS SQS queue that receives JSON messages.
Message Body:
[{"endpoint": "[url removed, login to view]", "objectId": "s436dgsfe30edee9e454456f3da", "userId": "235223sdf2e235", "updatedAt": "2016-08-02T22:02:19+00:00", "action": "updated", "model": "summary", "type": "summary"}]
These messages contain external API endpoints that must be called using parameters contained in the SQS message.
2. Calculate a HMAC-SHA1 signature from the message contents and 3 other variables, and validates the signature is correct by comparing it to the signature passed in the messages header attributes.
3a. If not valid, log an error to a DynamoDB table
3b. If valid, structure a URL from variables in the queue message and application level, and then make the external API call.
GET [url removed, login to view]
4. Process the resulting JSON payload from the GET request and store the results in a DynamodB table.
5. If any error is received or occurs in the processing, store the error in a DynamoDB table.
On step 3b & 4: The GET url and the DynamoDB table will change based on the "Type" attribute in the original message body of the SQS message.
Example 1:
Message Body:
[{"endpoint": "https://api.xxx.com/v1/summary", "objectId": "s436dgsfe30edee9e454456f3da", "userId": "235223sdf2e235", "updatedAt": "2016-08-02T22:02:19+00:00", "action": "updated", "model": "summary", "type": "summary"}]
GET https://api.xxx.com/v1/summary?objectId=s436dgsfe30edee9e454456f3da&accesstoken=25363562gsdgsd46253sgddsg
DynamoDB table = Summary
Example 2:
Message Body:
[{"endpoint": "https://api.xxx.com/v1/other", "objectId": "s436dgsfe30edee9e454456f3da", "userId": "235223sdf2e235", "updatedAt": "2016-08-02T22:02:19+00:00", "action": "updated", "model": "other", "type": "other"}]
GET https://api.xxx.com/v1/other?objectId=s436dgsfe30edee9e454456f3da&accesstoken=25363562gsdgsd46253sgddsg
DynamoDB table = Other
Project ID: #11174429
About the project
Awarded to:
I've work with python for 3 years. I think i can finish this project on 2-3 days. Let discuss about requirements.