This message was deleted.
s
This message was deleted.
s
Hello Mo 👋 Doesn't
layers
field expect
List<String>
(with
Output<List<String>>
overload), not
String
? I wrote this piece of code that compiles (notice
Output.all
usage):
Copy code
var exampleLayerVersion = new LayerVersion("exampleLayerVersion");

var exampleFunction = new Function("exampleFunction", FunctionArgs.builder()
        .layers(Output.all(exampleLayerVersion.arn()))
        .build());
You can also use
.applyValue
if you prefer:
.layers(exampleLayerVersion.arn().applyValue(List::of))
Let me know if that helps. If not, having a code snippet (with import statements) could help me understand your issue better.
s
Hello, Indeed, it does not expect a String directly, it uses
String...
where a single String can be passed. But to the main point, that does help.
Output.all(...)
does the trick, thanks!
the online documentation probably needs to be updated, the example does not work