I have an application deployed to Elastic Beanstalk with the Mutli-Container Docker configuration, which is backed by ECS and further backed by EC2. When I SSH onto the EC2 instance, is there some command I can run to identify the name of the EB application / environment that it's running under? Is there anything like aws elasticbeanstalk get-current-environment
?
The EB environment name and id is present in your instance tags. You could run the AWS CLI: aws ec2 describe-tags
to get the environment name. The tag keys would be:
Please note: you would need an IAM role attached to the instances with ec2:DescribeTags
permission for this command to work.