Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Elastic Beanstalk - Using eb to attach git repo to existing EB environment

Tags:

I have an Elastic Beanstalk app and environment already setup. I've just downloaded the Dev Tools CLI/eb on Windows, and would like to use eb to push to said environment.

If I use eb init, I have to create a new EB app and environment.

How do I initialize the git repo to an existing EB app and environment?

like image 686
Dan Hoerst Avatar asked Jan 08 '13 02:01

Dan Hoerst


People also ask

What two types of environments can be created when using Elastic Beanstalk?

In AWS Elastic Beanstalk, you can create a load-balanced, scalable environment or a single-instance environment. The type of environment that you require depends on the application that you deploy.

Which file is required for creating links between environments in Beanstalk?

Each component application must have an env. yaml configuration file in its application source bundle that specifies the parameters used to create its environment.

How do I connect to an EC2 instance created by Beanstalk?

Make a note of an instance ID that you want to connect to. In the navigation pane of the Amazon EC2 console, choose Instances, and find your instance ID in the list. Right-click the instance ID for the Amazon EC2 instance running in your environment's load balancer, and then select Connect from the context menu.


1 Answers

The way I ended up doing this was:

1) Download AWSDevTools from http://aws.amazon.com/developertools/AWS-Elastic-Beanstalk/6752709412171743

2) Move to your git repo on the CLI

3) Run /Downloads/elasticbeanstalk-cli/AWSDevTools/[Linux or Windows]/AWSDevTools-RepositorySetup.sh

EDIT: 3a) git aws.config

4) Enter AWS Access Key, AWS Secret Key, AWS Region, and enter the existing name of your AWS Application and AWS Environment.

5) Now you can git add, git commit as usual, and use git aws.push to push to your EB environment

7) You can follow the steps above to add other environments. For example if you had production and staging environments, and then use git aws.push --environment to use the same repo to push to both environments.

If you come across the error The specified module 'AWSDevTools' was not loaded on Windows, this is most likely because the AWSDevTools module is not at C:\Users\ USER \Documents\WindowsPowerShell\AWSDevTools\AWSDevTools.ps1.

like image 139
Dan Hoerst Avatar answered Sep 22 '22 06:09

Dan Hoerst