Giter VIP home page Giter VIP logo

stepfunctions-lambda-ec2-ssm's Introduction

Stepfunction EC2 SSM

This repo holds the stepfunction workflow for creating EC2 instance and execute remote powershell script for configuration of EC2 using Systems Manager (Run Command)

Description

There are scenarios where EC2 instances has to be created and need to be configured using Systems Manager powershell script. The script may take a long time depending upon the configuration and it may exceed lambda time limit of 15 mins.This solution provides a serverless approach using stepfunctions and lambda to create EC2 instance, execute the configurations from powershell script, wait for the script to complete by periodcally checking the runCommand status. The workflow also deletes the created EC2 instance irrespective of runCommand execution result.

Pre-requistie

  1. Terraform Installed
  2. Have the AWS Credentials setup.

Architecture

Architecture

Usage

These are the steps to be followed to execute this stepfuction workflow:

  1. git clone this repository and goto terraform directory
  2. Update the variables.tf file under terraform directory.
  3. Execute terraform commands, terraform init, terraform plan and terraform apply at terraform directory.
  4. Goto the AWS Console, go to Stepfunctions, pick ec2-ssm-state-machine-workflow and start the execution with empty json.
  5. If you need to destroy your infrastructure, execute the command terraform destroy.

StepFunction Workflow

StepFunction Workflow

Sample Snapshot of runCommand Execution

RunCommand

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

stepfunctions-lambda-ec2-ssm's People

Contributors

govindhiaws avatar amazon-auto 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.