Created
January 15, 2018 13:28
-
-
Save takakabe/62d9fa615607172bb59ebfad79cdbe18 to your computer and use it in GitHub Desktop.
python
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
# 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