is there an SST permission shortcut like `['*', 'g...
# help
s
is there an SST permission shortcut like
['*', 'grantInvoke']
? or do we have to use the
iam.PolicyStatement
?
a
Haven't tried it yet, but this looks awesome https://github.com/udondan/iam-floyd
s
thanks! but I was looking for something within SST
f
You can do something like this:
Copy code
const topic = new sst.Topic(this, "Topic");

fn.attachPermissions([[topic, "grantPublish"]]);
Does this work for you?
s
that’s the thing, I want to grant lambda invocation for all functions (*)
was just wondering if there was a shorthand. otherwise I’m doing:
Copy code
new iam.PolicyStatement({
          effect: iam.Effect.ALLOW,
          actions: ['lambda:InvokeFunction'],
          resources: ['*'],
        }),
f
Ah gotcha. This should work:
Copy code
fn.attachPermissions(["lambda:InvokeFunction"]);
s
ah! thanks 🙂
f