diff --git a/pkg/config/env/environment.go b/pkg/config/env/environment.go index 5fa7623794e1f..fba263f633d4e 100644 --- a/pkg/config/env/environment.go +++ b/pkg/config/env/environment.go @@ -62,7 +62,7 @@ func IsECS() bool { // IsECSFargate returns whether the Agent is running in ECS Fargate func IsECSFargate() bool { - return os.Getenv("ECS_FARGATE") != "" || os.Getenv("AWS_EXECUTION_ENV") == "AWS_ECS_FARGATE" + return os.Getenv("ECS_FARGATE") == "true" || os.Getenv("AWS_EXECUTION_ENV") == "AWS_ECS_FARGATE" } // IsHostProcAvailable returns whether host proc is available or not