bahrain-uob / eco-guard-challenge

This repository is for the Eco Guard challenge
1 stars 1 forks source link

cdk s3 trigger for lambda functions #101

Closed HusainAdel closed 6 months ago

yomnak commented 6 months ago
HusainAdel commented 6 months ago

@maramesk @cerashdan having an issue with the S3 trigger through cdk/sst using the provided ^ resources. They call for calling the trigger after creating the lambda function through cdk rather than sst and use the variable name- we cant do the same when creating it in sst and is giving us errors. Please advise.

maramesk commented 6 months ago

@HusainAdel If I understood you issue correctly, you can trigger lambda from S3 events with SST by importing your lambda in your S3 bucket stack and then using it as notification under bucket creation, you can find the directions here : https://docs.sst.dev/constructs/Bucket

Heres an example of how previous sem students have used it as well:

Screenshot 2024-05-21 at 9 29 13 AM
HusainAdel commented 6 months ago

thank you that is helpful; We have used this documentation, and we see where we went wrong. This issue has been moved to #125 & #124 to @bus3eed @Dalmajed