This message was deleted.
# general
s
This message was deleted.
f
Likely by assigning a role to the lambda (
role
property on
aws.lambda.CallbackFunction
resources) and attaching a policy to that role using
aws.iam.PolicyAttachment
.
b
hey @rich-television-43773 - there's a more verbose example here which shows how to this: https://github.com/pulumi/examples/blob/f2c2f7771674035da4945cc31373b20fc3940069/aws-ts-serverless-raw/index.ts
r
Many thanks!
Ah I forgot to add I wanted to use this -> https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/awsx/apigateway/ I’ve checked the parameters I can pass to options and don’t see a slot for role. anywhere in the endpoints definition there.
b
@rich-television-43773 it’s talking about the authorized here, but you can do the same thing with your event handler. Define a callback function and a role, and then pass that to your event handler https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/awsx/apigateway/#specifying-the-role
1