cloudtools / cloudtools/troposphere

Step Function - JSON with escaped characters

Open
#799 2 comments 4 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.9k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

Hi,

Troposphere version: 1.9.5

I tried to create a step function using StateMachine. The JSON file I get using "t.to_json" looks something like this (This is just an example, I have deleted most of the code):
"DefinitionString": "{\\"Comment\\": \\"test.\\", \\"States\\": {\\"test1\\": {\\"Resource\\": \\"arn:aws:lambda:\\", \\"End\\":}}"

The problem is that the CloudFormation service wont accept this:
Invalid State Machine Definition: 'SCHEMA_VALIDATION_FAILED at /Change /End' (Service: AWSStepFunctions; Status Code: 400; Error Code: InvalidDefinition; Request ID: 68410f6c-907f-11e7-81fa-0dc683bcb548)

The original JSON is correct and works if I paste it directly in the AWS Step Function console.

Can you please provide an example with the correct way to use the StateMachine?

Thanks,

Moshe.

Contributor guide

Open the contributing guide

Research direction

Start with the StateMachine entry point and the t.to_json output described in the report. Reproduce the escaped DefinitionString behavior using the reported Troposphere version, then verify that the generated CloudFormation definition is accepted by AWS Step Functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.