GithubHelp home page GithubHelp logo

praveen-erramilli / aws-stepfunctions-lambda Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 89 KB

An AWS Lambda project that uses stepfunctions, lambda and serverless to create database instance, create user in the db, create schema and create slave instance for the database

Java 100.00%

aws-stepfunctions-lambda's Introduction

AWS Stepfunction call back pattern using AWS Lambda

Stack : Java, Stepfunctions, Lambda, RDS, Serverless Framework

This project demonstrates the implementation of callback pattern in AWS Stepfunctions with Lambda

AWS Step Function allows us to coordinates various components in AWS using visual workflows.

Make sure you experiment this under AWS free tier and delete the resources after you use it. Else you would be charged for the resource usage. Also this project creates a slave instance for an RDS database. Doing this will exceed the free tier limit and it will cost you. Exclude the slave creation step if you want to avoid the costs.

This project is almost similar in use case with my other project https://github.com/epraveenns/AWS-CloudFormation-Lambda

Flow

Build:

  • Install serverless framework using npm install -g serverless
  • Switch to this project directory and do mvn clean install
  • Run serverless deploy command. This will take care of launching all the lambda and the required permissions to run the lambda. See serverless.yaml
  • Go to AWS Console > Create State Machine > Standard. Under definition, give the content as given in the file StepFunction.json. Skip the slave creation step if needed.
  • Click Next
  • Give a name for state machine and select 'create new role' under Permissions.

Run:

  • Go to the newly created step function > Start Execution > Give input as given in the file Input
  • Click on Start Execution and workflow will start

Medium post link : https://medium.com/@epraveenns/aws-step-function-call-back-pattern-using-aws-lambda-569678b0e02c

Note : The RDS Database that will be created will have a default security group as we are not configuring any security group for it. That security group should be configured to allow incoming requests from Lambda or else Lambda cannot connect to the RDS instance. This can be done either by allowing all traffic from any network into the security group (Not recommended for serious use cases) or else by configuring a VPC for lambda, RDS and Stepfunction which is not covered in this project.

aws-stepfunctions-lambda's People

Contributors

praveen-erramilli avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.