Git Product home page Git Product logo

cli2cloudformation's Introduction

cli2cloudformation

cli2cloudformation is an AWS lambda that provides the possibility to execute CLI Commands inside CloudFormation stacks.a

You can use cli2cloudformation to get all kind of information from your environment, for example:

  • Get the AMI ID by Name (In this case it will work in all the regions).
  • Get the default vpc, subnets or whatever your need.
  • Sync bucket during a CloudFormation execution.
  • Specify customized actions to executed in each CloudFormation operation: Create / Update / Delete.

Get Started

git clone https://github.com/lucioveloso/cli2cloudformation.git
cd cli2cloudformation
npm install -g serverless
npm install serverless-python-requirements
sls deploy

After that, you're ready to enjoy the CLI in Cloudformation:

Example getting the AMI ID in any region:

"imageIdNameBased": {
        "Type": "Custom::cli2cfnLambda",
        "Properties": {
          "ServiceToken": "arn:aws:lambda:eu-west-1:123456789012:function:cli2cloudformation-dev-cli",
          "Create": "ec2 describe-images --filters 'Name=name,Values=amzn-ami-hvm-2017.03.0.20170417-x86_64-gp2' --query 'Images[0]'"
	}
}

Than, in any part of your template you can get this result just including:

"Fn::GetAtt" : ["imageIdNameBased", "ImageId"]

cli2cloudformation's People

Contributors

janakaud avatar lucioveloso 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.