GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bluepeter/aws-lambda-invoke-step-function: A simple boilerplate to invoke AWS Step Functions from AWS Lambda.

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.env
.env
 
 
.gitignore
.gitignore
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
context.json
context.json
 
 
deploy.env.example
deploy.env.example
 
 
event.json
event.json
 
 
index.js
index.js
 
 
package.json
package.json
 
 

Repository files navigation

Node.js Lambda Function To Invoke AWS Step Function

This is a simple Node.js AWS Lambda seed that invokes an AWS Step Function. It uses node-lambda for locally running and deploying.

AWS Step Functions are a great way to maintain state and orchestrate AWS Lambda functions. However, currently, invoking a Step Function is limited to, e.g., API Gateway, Cloudwatch, etc. The purpose of this repo is to serve as a means to invoke a Step Function from a Lambda function. This way, if you want to, for example, invoke a Step Function from SES, this function can serve as the conduit.

To use:

  1. npm i -g aws-sdk to install AWS SDK if you haven't already.
  2. npm i in repo directory to build node modules.
  3. Configure aws-sdk in your home directory. Ensure the Lambda-controlling aws_access_key_id and aws_secret_access_key are in, e.g., ~/.aws. This way you don't have to keep this in .env which I prefer to keep in version control.
  4. Create an AWS Lambda function on AWS. Edit .env and package.json with your Lambda function name.
  5. Create an AWS IAM Role with a Lambda trusted relationship. Give it permissions for Step Functions. Edit .env to add the role.
  6. Create a Hello World Step Function. Edit index.js with the ARN of this Step Function.
  7. npm run start to run it locally! It works, right? Great!
  8. npm run deploy to push into the cloud...
  9. Test that everything works by executing the Lambda function from AWS Console.

About

A simple boilerplate to invoke AWS Step Functions from AWS Lambda.

Topics

aws-lambdaaws-sdkaws-step-functionnode-lambdaserverless

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.