Skip to content

Instantly share code, notes, and snippets.

@RyanDsilva
Created August 26, 2021 19:03
Show Gist options
  • Save RyanDsilva/4d2ca8f6e3ae7fc6e5c1ef771cdd112a to your computer and use it in GitHub Desktop.
Save RyanDsilva/4d2ca8f6e3ae7fc6e5c1ef771cdd112a to your computer and use it in GitHub Desktop.
AWS Step Functions serverless.yml
service: aws-step-functions
variablesResolutionMode: 20210326
provider:
name: aws
stage: ${opt:stage, 'dev'}
# profile: profile-name
region: eu-west-1
runtime: nodejs14.x
package:
individually: true
patterns:
- '!node_modules/aws-sdk/**'
- '!.npm/**'
functions:
action:
name: ${self:provider.stage}-action
description: Action
handler: index.handler
memorySize: 256
maximumRetryAttempts: 2
timeout: 10
stepFunctions:
stateMachines:
stepFunctionName:
name: ${self:provider.stage}-stepFunctionName
events:
- http:
path: execute
method: POST
cors: true
definition:
Comment: "Description of Step Function"
StartAt: WaitTillScheduled
States:
WaitTillScheduled:
Type: Wait
TimestampPath: "$.dueDate"
Next: ActionEvent
ActionEvent:
Type: Task
Resource:
Fn::GetAtt: [functionName, Arn]
End: true
validate: true
plugins:
- serverless-step-functions
- serverless-plugin-common-excludes
- serverless-jetpack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment