我正在尝试使用默认凭证提供程序链概念为不同的 aws 资源创建 Spring Bean。 我可以为 sqs、s3 等资源构建 bean,但无法找到为物联网核心创建相同内容的方法。
@Bean
public AmazonSQSAsync amazonSQSAsync() {
AmazonSQSAsync amazonSQSAsync =
AmazonSQSAsyncClientBuilder.standard().withRegion(Regions.AP_SOUTH_1).build();
return amazonSQSAsync;
}
@Bean
public AmazonS3 getS3Config() {
AmazonS3 s3Client = AmazonS3ClientBuilder.standard()
.withRegion(Regions.AP_SOUTH_1).build();
return s3Client;
}
我想要这样的东西来为aws iot core(AWSIotMqttClient)创建bean。 我正在使用以下物联网核心依赖项。
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-iot-device-sdk-java</artifactId>
<version>1.3.11</version>
</dependency>