Open jbesw opened 4 years ago
Hi @jbesw , can you run the following command (sam validate --debug
) and provide the value for DefinitionUri
in generated CFN template?
Hi, I am getting the same error. This is what I got when I ran sam validate --debug
which came back as valid.
CustomResourceStateMachine:
Type: AWS::StepFunctions::StateMachine
Properties:
DefinitionUri: statemachine/main.asl.json
The SAM transform doesn't support local paths, while SAM CLI does.
I tried reproducing with the SAM transform using the closest valid template:
Transform: AWS::Serverless-2016-10-31
Resources:
ResizerStateMachine:
Type: AWS::Serverless::StateMachine
Properties:
DefinitionUri: s3://foo-bar/egg-baz
Which transformed (as expected) to the following template:
Resources:
ResizerStateMachine:
Type: AWS::StepFunctions::StateMachine
Properties:
DefinitionS3Location:
Bucket: foo-bar
Key: egg-baz
RoleArn: !GetAtt 'ResizerStateMachineRole.Arn'
Tags:
- Key: stateMachine:createdBy
Value: SAM
ResizerStateMachineRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Action:
- sts:AssumeRole
Effect: Allow
Principal:
Service:
- states.amazonaws.com
ManagedPolicyArns: []
Tags:
- Key: stateMachine:createdBy
Value: SAM
Hyphen/dash character in DefinitionUrl causes error - error message does not indicate this is the problem.
Description
Deploying a template with a Uri like this:
...causes the error "Property validation failure: [Encountered unsupported properties in {/}: [DefinitionUri]]" Removing the dash, it deploys correctly.
Steps to reproduce
Deploy a state machine with a dash in the DefinitionUri.
Observed result
"Property validation failure: [Encountered unsupported properties in {/}: [DefinitionUri]]"
Expected result
Either:
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: 0.53.0Add --debug flag to command you are running