How to pass s3 object names getting from the lambda events as a parameters to the AWS Glue Workflow

354 Views Asked by At

I have an S3 bucket that will trigger invoking a lambda function based on the put event type. Then the lambda function will trigger the Glue workflow. In the Glue workflow, I have created one glue job that converts XLSX files to CSV. This is the overall scenario. Now I will fetch uploaded object names(XLSX files) based on the lambda event. But how can I pass these object names to the Glue job once lambda trigger to the Glue workflow? Can I pass object names one after another to the job dynamically once the workflow starts so that all the files will convert at one shot?

Thanks!

1

There are 1 best solutions below

2
On

Lambda function handler's one of parameter is event and other is context. Event parameter structure is depend on invoking Service. For S3 service you can find event structure at here.

event.Records[0].s3.object.key

is your needs.