0

The error below occurred When I deploy a stepfunction by using SAM deployment. Are there any idea why it happened.

■ template.yaml

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Test Stack

Resources:
  TestSFN:
    Type: 'AWS::StepFunctions::StateMachine'
    Properties:
      RoleArn: arn:aws:iam::xxxxxxx:role/service-role/StatesExecutionRole-ap-northeast-1
      DefinitionString: |
        {
          "Comment": "test step function",
          "StartAt": "Test",
          "States": {
            "Test": {
              "Type": "Pass",
              "End": true
            }
          }
        }

■ Deployment commands

$ sam package --template-file template.yaml --s3-bucket test-sam --output-template-file package.yaml
$ sam deploy --template-file package.yaml --stack-name TestStack --capabilities CAPABILITY_IAM

■ Error capture enter image description here

Tamajin
  • 155
  • 5
  • That issue is not related to SAM. SAM shouldn't touch your `AWS::StepFunctions::StateMachine`, so it's just related to CloudFormation. – Dunedan Jan 06 '19 at 07:16
  • 1
    Does the role in `RoleARN` exist?. Also I'd try adding a `-` after the `|` in the `DefinitionString` as seen in the documentation [example](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html) – maafk Jan 07 '19 at 00:54

0 Answers0