This looks like a Java SDK bug rather than anything AWS specific.
Firstly do raise an issue about this on the java repo, this should just work.
As a workaround try setting targetHealthStates to an empty list (not null) in the builder and see if that helps.
a
astonishing-beach-97981
11/15/2023, 8:00 PM
Hi Fraser,
Thank you for the reply! I will raise the issue.
w
wonderful-wire-57788
11/21/2023, 10:04 PM
Which version of java should I use? I am getting the same error
w
wooden-country-28133
11/22/2023, 2:57 AM
Try changing the dependency versions in your pom.xml, at least these worked for me
<dependency>
<groupId>com.pulumi</groupId>
<artifactId>pulumi</artifactId>
<version>0.9.5</version>
</dependency>
<dependency>
<groupId>com.pulumi</groupId>
<artifactId>aws</artifactId>
<version>5.42.0</version>
</dependency>