sst / ion

❍ — a new engine for SST
https://ion.sst.dev
MIT License
1.04k stars 114 forks source link

Link resources to SQSHandler #435

Closed samcxps closed 1 week ago

samcxps commented 1 month ago

Hello, I'm a new user and loving the framework so far!

I have an SQS and subscriber setup and am wondering how to link the subscriber function to other resources.

For example, I have an s3 bucket and a Dynamo table I would like to access via the SQS subscriber. There is no link param on the subscribe() method or the constructor for the Queue.

Will I need to use the transform param to add a custom IAM role or something? Not exactly sure how to go about.

Thank you in advance!

Screenshot 2024-05-17 at 3 24 24 PM

thdxr commented 4 weeks ago

can you show your sst.config.ts ?

jayair commented 4 weeks ago

subscribe takes FunctionArgs and that has a link: https://ion.sst.dev/docs/component/aws/function/#functionargs