boto / boto3

AWS SDK for Python
https://aws.amazon.com/sdk-for-python/
Apache License 2.0
8.96k stars 1.86k forks source link

create Elastic Beanstalk Environment from boto3 #766

Closed ghost closed 8 years ago

ghost commented 8 years ago

I need to create Elastic Beanstalk Environment from boto3. For which I guess the API sequence should be

  1. _createapplication() : from this API we get the Application Name
  2. _create_environment(**kwargs)**_: Here i am passing below json as kwargs to api

{ "ApplicationName": "APP-NAME", "EnvironmentName": "ABC-Nodejs", "CNAMEPrefix": "ABC-Neptune", "SolutionStackName": "64bit Amazon Linux 2016.03 v2.1.1 running Node.js" } Questions:

  1. How to mention that the Environment EC2 should be attached to which VPC and subnet
  2. In which Subnet its ELB should be created

Any sample code will be helpful Please Note: I have one public and one private subnet, we can control the creation of EC2 and ELB creation through subnet IDs

kyleknap commented 8 years ago

I would recommend asking this question on the elastic beanstalk forums: https://forums.aws.amazon.com/forum.jspa?forumID=86. They will be much more knowledgeable of how to set this up appropriately through their API.