aws-samples / aws-samples/appstream-serverless-image-creation-automation

State machine state definitions use input JSON incorrectly

Open
#3 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.