Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (120 points)
Hi,

I'm new to lamba function. Here i need to create lambda function for "when csv report generated then this report send to user mail using lambda function". I'm new to this lambda function. I really dont know what service should i enable and what should i write in lambda function? please guide me. Im really confused.

1 Answer

0 votes
by (12.4k points)

You can use the below command for that:

csvfile = s3.get_object(Bucket=bucket, Key=file_key)

csvcontent = csvfile['Body'].read().split(b'\n')

and now just pass "csvcontent" into the reader:

csv_data = csv.DictReader(csvcontent)

Interested in learning AWS? Come & join: AWS Course

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer

Browse Categories

...