This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
EC2MetadataUtils used to determine if running on cloud environment does not work on ECS Fargate #734
Labels
component: core
An issue related to core functionality - credentials, region resolution
theme: ecs
type: bug
A general bug
Type: Bug
Describe the bug
Version of Spring Cloud:
org.springframework.cloud:spring-cloud-dependencies:Hoxton.SR9
Which resolves to spring cloud aws version 2.2.5.RELEASE
When the application starts up the org.springframework.cloud.aws.context.support.env.AwsCloudEnvironmentCheckUtils attempts to determine if the code is running in a cloud environment by using com.amazonaws.util.EC2MetadataUtils. This does not appear to work if the code is deployed to ECS Fargate.
I have already set the following in my application.yml:
As described in PR: #559
But this seems to be yet another case where the class being used needs to be configurable based on the platform in AWS the code is deployed to EC2 vs ECS Fargate.
Sample
Deploy any spring app using the spring cloud aws version 2.2.5.RELEASE to ECS Fargate and you should see this issue
The text was updated successfully, but these errors were encountered: