Reputation: 5715
How can I retrieve information using the AWS CLI about the active elastic beanstalk instance setup in a blue/green manner (where two environments are running side by side).
Running the following command gives me an array of environments for my application:
aws elasticbeanstalk describe-environments --application-name MyApp
Although I would prefer a command which only returned the active environment (and not the inactive).
Is the most accurate way to tell this by CNAME
containing the string inactive
from the command output?
The specific piece of data which I require is EnvironmentName
.
Upvotes: 1
Views: 742
Reputation: 45223
You need several aws cli to find it out.
aws route53 list-hosted-zones
aws elasticbeanstalk describe-environments --application-name MyApp | jq -r '.Environments[].CNAME'
export its CNAME
aws route53 list-resource-record-sets --hosted-zone-id <hosted-zone-id>
elasticbeanstalk
cliUpvotes: 2