CloudFormation QuickstartΒΆ

  1. Prepare the project directory. See Repo Structure for more details.

    $ mkdir my-app && cd my-app
    $ git init && git checkout -b ENV-dev
    
  2. Download/install Runway. To see available install methods, see Installation.

  3. Use Runway to generate a sample CloudFormation module<runway-module, edit the values in the environment file, and create a Runway config file to use the module.

    $ runway gen-sample cfn
    $ sed -i -e "s/CUSTOMERNAMEHERE/mydemo/g; s/ENVIRONMENTNAMEHERE/dev/g; s/cfngin-/cfngin-$(uuidgen|tr "[:upper:]" "[:lower:]")-/g" sampleapp.cfn/dev-us-east-1.env
    $ cat <<EOF >> runway.yml
    ---
    # Full syntax at https://github.com/onicagroup/runway
    deployments:
      - modules:
          - sampleapp.cfn
        regions:
          - us-east-1
    EOF
    
  4. Deploy the stack.

    $ runway deploy
    

Now our stack is available at mydemo-dev-sampleapp, e.g.:

$ aws cloudformation describe-stack-resources --region us-east-1 --stack-name mydemo-dev-sampleapp