aws-samples / aws-samples/appstream-serverless-image-creation-automation
State machine state definitions use input JSON incorrectly
- Dominant language
- Python
- Stars
- 14
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Many of the Task States for the state machine created in the Windows CloudFormation use parameters from the "AutomationParameters" dictionary in the input JSON. for example:
```
"Check Builder Status (Create)": {
"Type": "Task",
"Resource": "arn:aws:states:::aws-sdk:appstream:describeImageBuilders",
"Parameters": {
"Names.$": "States.Array($.AutomationParameters.ImageBuilderName)"
},
"ResultPath": "$.BuilderStatus",
"Next": "Is Builder Created and Running?"
},
```
This JSON path does not however match the actual input JSON. Example input data:
```
{
"ExecutedVersion": "$LATEST",
"Payload": {
"AutomationParameters": {
"ImageBuilderName": "Automated_Builder",
"ImageBuilderType": "stream.standard.medium",
...
```
To get these States to function, I therefore had to update the parameters to include ".Payload" in the path:
```
"Parameters": {
"Names.$": "States.Array($.Payload.AutomationParameters.ImageBuilderName)"
},
```
Contributor guide
Assessment
This issue has not been assessed yet.