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

后端 未结 7 1976
悲哀的现实
悲哀的现实 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:31

    Regarding Q1, try to build your client using the following syntax:

    AmazonS3 amazonS3 = AmazonS3Client.builder()
        .withRegion("us-east-1")
        .withCredentials(new AWSStaticCredentialsProvider(creds))
        .build();
    

提交回复
热议问题