Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
python
# coding: utf-8
def lambda_handler(event, context):
import boto3
s3 = boto3.client('s3')
bucket_name = 'kabegiwa_bucket'
file_name = 'syukujitsu.csv'
response = s3.get_object(Bucket=bucket_name, Key=file_name)
body = response['Body'].read()
bodystr = body.decode('utf-8')
lines = bodystr.split('\r\n')
print(lines)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment