service: legacy-sync-deployment

provider:
  name: aws
  runtime: python3.6

stepFunctions:
  stateMachines:
    hellostepfunc1:
      events:
        - http:
            path: /sf
            method: POST
            cors:
              origin: '*'
              headers:
                - Content-Type
                - X-Amz-Date
                - Authorization
                - X-Api-Key
                - X-Amz-Security-Token
                - X-Amz-User-Agent
              allowCredentials: false
      definition:
        Comment: "StepFunction for buckets synchronization after asset uploading."
        StartAt: EncodingStatusLambda
        States:
          EncodingStatusLambda:
            Type: Task
            Resource: "arn:aws:lambda:#{AWS::Region}:#{AWS::AccountId}:function:${opt:encoding-status-lambda}"
            Next: LegacySyncLambda
          LegacySyncLambda:
            Type: Task
            Resource: "arn:aws:lambda:#{AWS::Region}:#{AWS::AccountId}:function:${opt:legacy-sync-lambda}"
            End: true
plugins:
  - serverless-step-functions
  - serverless-pseudo-parameters
