# java


09/26/2023, 2:40 PM
hi, I was trying to define an AWS IAM policy as JSON as the docs now seem to exemplify See But when I try to create the resource definition (put ARN in) with my bucket output, this does not go well 😉 and ends in stack overflow How would you use outputs that need to be handled async with this static json def ? java.util.concurrent.CompletionException: java.lang.StackOverflowError at java.base/java.util.concurrent.CompletableFuture.encodeThrowable( at java.base/java.util.concurrent.CompletableFuture.completeThrowable( at java.base/java.util.concurrent.CompletableFuture$ at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec( at java.base/java.util.concurrent.ForkJoinTask.doExec( at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec( at java.base/java.util.concurrent.ForkJoinPool.scan( at java.base/java.util.concurrent.ForkJoinPool.runWorker( at java.base/ Caused by: java.lang.StackOverflowError at at at ::: I reverted to using for now which also work fine for me.