AWS Java SDK - Unable to find a region via the region provider chain

后端 未结 7 1977
悲哀的现实
悲哀的现实 2020-12-05 17:17

I have gone through the question titled \"Setting the AWS region programmatically 1\" but it doesn\'t provide all the answers I need.

Q1: I\'m getting a SDKCli

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-05 17:33

    withRegion(Regions.DEFAULT_REGION) helped me to solve my issue

    return AmazonS3ClientBuilder.standard()
    .withCredentials(new AWSStaticCredentialsProvider(awsCredentials))
    .withRegion(Regions.DEFAULT_REGION)
    .build();
    

提交回复
热议问题