I have an AWS question: I have an application running on Beanstalk. I have two environments, XXX-LIVE and XXX-TEST.

I would like to know how I can get the Environment name using the SDK, since I want to point to my test database if the code is running on the XXX-TEST environment?

So far I have only found the .RetrieveEnvironmentInfo() method of the object AWSClientFactory.CreateAmazonElasticBeanstalkClient();

But this requires that you provide the Environment name/ID.

Can anyone help?