how to allow s3 notification events to save picture to dynamodb
See original GitHub issuei’ve declared a s3Stack with a notification function that will invoke upon item picture is uploaded to s3 bucket. however, in the notification function, i am trying to save some of the image metadata (url, filename etc) to a dynamoDB.
export async function savePhotoToDB(item) {
console.log(`ASSET TABLE NAME: ${process.env.ASSET_TABLE_NAME}`);
const params = {
// Get the table name from the environment variable
TableName: process.env.ASSET_TABLE_NAME,
Item: item,
};
await dynamoDb.put(params).promise();
}
process.env.ASSET_TABLE_NAME
always return undefined.
how should i define it in my s3Stack so that i can access it in the above function which will trigger upon file uploaded to s3 bucket?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
enable and configure event notifications for an S3 bucket
In the Buckets list, choose the name of the bucket that you want to enable events for. Choose Properties. Navigate to the Event...
Read more >Configuring AWS S3 Event Notifications | Notify SNS Topics ...
DevOps Online Training Registration form: https://bit.ly/valaxy-formFor Online training, connect us on WhatsApp at +91-9642858583 =======...
Read more >How to import CSV data into DynamoDB using Lambda and ...
On the S3 Console / Click on the s3 bucket named friends-s3 · Click on the Properties tab / go down to Event...
Read more >Amazon Web Services - Amazon S3 Notifications to SNS
Create Event Configuration: To create events, go to the properties of the bucket and click on create event notifications tab. Specify the event...
Read more >AWS S3 Bucket: Event Notifications | by Priyam Chauhan
Enabling S3 Event Notifications · Login to AWS Console and head to S3 service. · Select the S3 bucket on which you want...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
thanks @fwang ! that did the trick!
Try this: