Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we determine the current region with AWS Fargate

I have a Java application running on AWS Fargate. Regions.getCurrentRegion() returns null from within an AWS Fargate for security reasons

Is there an alternative way to determine which region the fargate container is running in?

like image 609
dogfish Avatar asked Dec 17 '22 21:12

dogfish


1 Answers

In Fargate, the current region is available via the AWS_REGION environment variable.

like image 188
Samuel Karp Avatar answered Jan 07 '23 15:01

Samuel Karp