diff --git a/hostinfo/hostinfo.go b/hostinfo/hostinfo.go index 9f4099e61..791da939c 100644 --- a/hostinfo/hostinfo.go +++ b/hostinfo/hostinfo.go @@ -28,6 +28,7 @@ const ( AWSLambda = EnvType("lm") Heroku = EnvType("hr") AzureAppService = EnvType("az") + AWSFargate = EnvType("fg") TestCase = EnvType("tc") ) @@ -60,6 +61,9 @@ func getEnvType() EnvType { if inAzureAppService() { return AzureAppService } + if inAWSFargate() { + return AWSFargate + } return "" } @@ -129,3 +133,10 @@ func inAzureAppService() bool { } return false } + +func inAWSFargate() bool { + if os.Getenv("AWS_EXECUTION_ENV") == "AWS_ECS_FARGATE" { + return true + } + return false +}