Reputation: 1093
I'm learning more about Elastic Beanstalk and for that I'm trying to practice the tutorials in the amazon website. I first did the python-django application tutorial which was all done using EB CLI. Now I'm doing the Node.js tutorial. I created the environment using the console, but I'm not able to understand how to access it using EB CLI. I searched in Amazon website but couldn't find anything relevant.
Any help?
Upvotes: 0
Views: 1396
Reputation: 381
You can download the source code that is deployed to your Beanstalk environment from the console: https://console.aws.amazon.com/elasticbeanstalk/home?region=REGION#/application/versions?applicationName=APPLICATION_NAME
. . . but replace REGION and APPLICATION_NAME with the region and app name you're working on. The 'Source' column has a link to the ZIP file that was uploaded to S3. Clicking the link will download the source code to your local computer.
From there, after you unzip your files, you can set up a new workspace with eb init
. The wizard should give you the option to select your existing Application and Environment.
If you want to associate an existing workspace at a new Environment that's possible too. You'll need to check to make sure your workspace is configured with the right application name.
% cd .elasticbeanstalk
% vi config.yml
Look for . . .
global:
application_name: APPLICATION_NAME
You can modify this file with the correct application name. Then navigate to the root of your project and change the Beanstalk environment.
% eb list
% eb use ENVIRONMENT_NAME_FROM_LIST
The check the status to ensure that everything is configured correctly.
% eb status
Hope that helps! Good luck!
Upvotes: 2