Skip to content

How to invoke s3 create object event using sam-local #164

@shilpa-jindal

Description

@shilpa-jindal

I have written a Lambda function that uploads data from a file to Database when a new file is uploaded to S3.
I have the test file on my local folder.
How do i generate an S3 event which mimics file upload on s3 bucket by pointing to my local folder?
For example, i have "test.txt" file sitting in /usr/local/samlocal-files/ folder on my local.
So, how do i create S3 event in a way that
S3Object object = amazonS3.getObject(new GetObjectRequest(s3Bucket, s3Key)); is able to read file "/usr/local/samlocal-files/test.txt" ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions