mokamoka03210120 commented on code in PR #26098:
URL: https://github.com/apache/beam/pull/26098#discussion_r1165853357
##########
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/options/AwsModule.java:
##########
@@ -175,6 +177,14 @@ public AwsCredentialsProvider deserializeWithType(
.refreshRequest(jsonParser.getCodec().treeToValue(json,
clazz).build())
.stsClient(StsClient.create())
.build();
+ } else if (typeName.equals(
+
StsAssumeRoleWithWebIdentityCredentialsProvider.class.getSimpleName())) {
+ Class<? extends AssumeRoleWithWebIdentityRequest.Builder> clazz =
+ AssumeRoleWithWebIdentityRequest.serializableBuilderClass();
+ return StsAssumeRoleWithWebIdentityCredentialsProvider.builder()
+ .refreshRequest(jsonParser.getCodec().treeToValue(json,
clazz).build())
+ .stsClient(StsClient.create())
Review Comment:
Thanks for the advice!
I fixed it to use `AnonymousCredentialsProvider.create()`.
In addition, it may be necessary to specify aws region. I tried running a
pipeline with this fix on Cloud Dataflow and received a error of
serialize/deserialize failure of `awsCredentialProvider`.
If the region specified, the pipeline works well.
```
StsClient.builder()
.region(Region.US_EAST_1)
.credentialsProvider(AnonymousCredentialsProvider.create())
.build()
```
I will confirm it later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]