AWS Lambda Function - polling SQS, making outbound API call, and inserting into DynamoDB -- 2
$30-250 USD
Abgeschlossen
Veröffentlicht vor mehr als 7 Jahren
$30-250 USD
Bezahlt bei Lieferung
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": "[login to view URL]", "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 [login to view URL]
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.