Created
December 10, 2020 18:44
-
-
Save bahrmichael/8aab5650c50ea71ec61f877e86d3ce9f to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"Comment": "A Hello World example of the Amazon States Language using Pass states", | |
"StartAt": "Invoke an API Gateway URL", | |
"States": { | |
"Invoke an API Gateway URL": { | |
"Type": "Task", | |
"Resource": "arn:aws:states:::apigateway:invoke", | |
"Parameters": { | |
"ApiEndpoint": "xxxxxxxxxx.execute-api.us-east-1.amazonaws.com", | |
"Method": "GET", | |
"Stage": "prod", | |
"Path": "/v2/status", | |
"AuthType": "NO_AUTH" | |
}, | |
"Next": "Put item into DynamoDB" | |
}, | |
"Put item into DynamoDB": { | |
"Type": "Task", | |
"Resource": "arn:aws:states:::dynamodb:putItem", | |
"Parameters": { | |
"TableName": "EsiStatusTable", | |
"Item": { | |
"pk": { | |
"S.$": "$.Headers.Date[0]" | |
}, | |
"count": { | |
"N.$": "States.Format($.ResponseBody.players)" | |
} | |
} | |
}, | |
"End": true | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment