nirmalkumarv
12/21/2016 - 3:44 PM

AWS Quick Start Demo - Elastic Beanstalk Setup

AWS Quick Start Demo - Elastic Beanstalk Setup

{
  "AWSTemplateFormatVersion" : "2010-09-09",

  "Description" : "AWS Quick Start Demo - Elastic Beanstalk App Setup.",

  "Parameters" : {
    "VPC": {
      "Description" : "ID of the VPC to use",
      "Type": "String",
      "MinLength": "1",
      "MaxLength": "255"
    },
    "SecurityGroup": {
      "Description" : "ID of the Security Group to use",
      "Type": "String",
      "MinLength": "1",
      "MaxLength": "255"
    },
    "Subnets": {
      "Description" : "Comma separated list of subnets to use",
      "Type": "String",
      "MinLength": "1",
      "MaxLength": "255"
    },
    "KeyName": {
      "Description" : "Key to use",
      "Type": "String",
      "MinLength": "1",
      "MaxLength": "255"
    },
    "Role": {
      "Description" : "IAM Role to use",
      "Type": "String",
      "MinLength": "1",
      "MaxLength": "255"
    }
  },
  "Resources" : {
    "SampleApplication" : {
      "Type" : "AWS::ElasticBeanstalk::Application",
      "Properties" : {
        "Description" : "AWS Elastic Beanstalk Demo Application",
        "ApplicationVersions" : [{
          "VersionLabel" : "Initial Version",
          "Description" : "Version 1.0",
          "SourceBundle" : {
            "S3Bucket" : "elasticbeanstalk-samples-eu-west-1",
            "S3Key" : "FirstSample.zip"
          }
        }]
      }
    },

    "SampleEnvironment" : {
      "Type" : "AWS::ElasticBeanstalk::Environment",
      "Properties" : {
        "ApplicationName" : { "Ref" : "SampleApplication" },
         "Description" :  "AWS Elastic Beanstalk Environment running Demo Application",
         "SolutionStackName" : "64bit Windows Server 2012 R2 running IIS 8.5",
         "OptionSettings" : [
           {"Namespace" : "aws:autoscaling:launchconfiguration", "OptionName" : "SecurityGroups", "Value" : { "Ref" : "SecurityGroup" }},
           {"Namespace" : "aws:autoscaling:launchconfiguration", "OptionName" : "EC2KeyName", "Value" : { "Ref" : "KeyName" }},
           {"Namespace" : "aws:ec2:vpc", "OptionName" : "VPCId", "Value" : { "Ref" : "VPC" }},
           {"Namespace" : "aws:ec2:vpc", "OptionName" : "Subnets", "Value" : { "Ref" : "Subnets" }},
           {"Namespace" : "aws:ec2:vpc", "OptionName" : "ELBSubnets", "Value" : { "Ref" : "Subnets" }},
           {"Namespace" : "aws:autoscaling:launchconfiguration", "OptionName" : "IamInstanceProfile", "Value" : { "Ref" : "Role" }},
           {"Namespace":"aws:autoscaling:launchconfiguration", "OptionName":"InstanceType", "Value":"t2.micro" },
           {"Namespace":"aws:ec2:vpc", "OptionName":"AssociatePublicIpAddress", "Value":"true" }],
         "VersionLabel" : "Initial Version"
      }
    }
  },

  "Outputs" : {
  }
}