Created
November 24, 2024 01:33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk'); | |
const s3 = new AWS.S3(); | |
exports.handler = async (event) => { | |
const bucketName = event.Records[0].s3.bucket.name; | |
const objectKey = event.Records[0].s3.object.key; | |
console.log(`Processing file: ${objectKey} from bucket: ${bucketName}`); | |
// Perform your processing logic here | |
return { message: "File processed successfully" }; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment