Issue
I'm trying to determine winch application version is deployed to the environment my code is running on.
I know that Elastic Beanstalk is tracking this as you can view it from:
In Elastic Beanstalk Console:
All Applications > [Application Name] -> Application versions
In the table displayed here, it shows the Version Label, and a list of which Environments it's Deployed To
Does anyone know how to query the EC2 container / EB from within the instance / environment to get the Version Label of the currently deployed application version? Thanks.
Solution
As per the AWS docs here, you can use the eb cli command eb status {environment-name}
which will give you an output that includes the Deployed Version
:
$ eb status
Environment details for: tmp-dev
Application name: tmp
Region: us-west-2
Deployed Version: None
Environment ID: e-2cpfjbra9a
Platform: 64bit Amazon Linux 2014.09 v1.0.9 running PHP 5.5
Tier: WebServer-Standard-1.0
CNAME: tmp-dev.elasticbeanstalk.com
Updated: 2014-10-29 21:37:19.050000+00:00
Status: Launching
Health: Grey
Answered By - hephalump Answer Checked By - Katrina (WPSolving Volunteer)