com.amazonaws.SdkClientException: Unable to load region information from any provider in the chain

Hot problem!
This exception has a lot of traffic. You can help 27 users by writing a short tip.

Solutions on the web

Solution icon of stackoverflow
Unable to load region information from any provider in the chain

Solution icon of github
Unable to load region information from any provider in the chain 16:35:03.368 [main] DEBUG com.amazonaws.regions.InstanceMetadataRegionProvider - Ignoring failure to retrieve the region: Unable to contact EC2 metadata service.

Stack trace

com.amazonaws.SdkClientException: Unable to load region information from any provider in the chain
	at com.amazonaws.regions.AwsRegionProviderChain.getRegion(AwsRegionProviderChain.java:56)
	at com.amazonaws.client.builder.AwsClientBuilder.setRegion(AwsClientBuilder.java:319)
	at com.amazonaws.client.builder.AwsClientBuilder.configureMutableProperties(AwsClientBuilder.java:295)
	at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:38)
	at com.eoffice.aws.speech.Polly.main(Polly.java:42)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.