spring-cloud-aws 4

Unable to load AWS credentials from any provider in the chain 해결

spring-cloud-aws 를 사용할때 이런 에러가 날 수 있다. com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain: [com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@64c19877: Failed to connect to service endpoint: , com.amazonaws.auth.profile.ProfileCredentialsProvider@7f570ac4: profile file cannot be null 이 경우, credeitnals를 넣어주어야 하고 몇 가지 해결책이 있다. 1. Access Key 발급받아..

Failed to connect to service endpoint (Warning) 해결

spring-cloud-aws를 이용한 프로젝트를 로컬에서 실행시킬때 Application 자체는 잘 뜨는데 이런 Warning이 날 때가 있다. com.amazonaws.SdkClientException: Failed to connect to service endpoint Caused by: java.net.SocketTimeoutException: connect timed out 이런 Warning이 나는 코드를 살펴보면, public final class AwsCloudEnvironmentCheckUtils { private static final String EC2_METADATA_ROOT = "/latest/meta-data"; private static Boolean isCloudEnviron..

There is no EC2 meta data available, because the application is not running in the EC2 environment 해결

build.gradle에 spring-cloud-aws-autoconfigure 을 설정하고 로컬에서 실행시키면 다음과 같은 에러가 나올 수 있다. (줄바꿈 추가) Caused by: java.lang.IllegalStateException: There is no EC2 meta data available, because the application is not running in the EC2 environment. Region detection is only possible if the application is running on a EC2 instance 에러를 해석해보면, application이 돌아가는 환경이 EC2가 아니라 meta data가 없다는 뜻이다. 오호.. region 정보를 추가..

Failed to instantiate StackNameProvider 해결

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.aws.core.env.stack.config.StackNameProvider]: Factory method 'autoDetectingStackNameProvider' threw exception; nested exception is java.lang.IllegalArgumentException: No valid instance id defined Spring Cloud AWS 의 auto configure를 이용할때 위와 같은 에러가 날 수 있다. 이럴때는.. cloud: aws: stack: auto..