Created
April 24, 2018 16:15
-
-
Save charliejllewellyn/09f0589dbc150cdb8552874c4ea117e8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import subprocess as sub | |
import boto3 | |
import os | |
def getObj(): | |
os.chdir('/tmp') | |
s3 = boto3.resource('s3') | |
s3.meta.client.download_file('cjl-chelt-hack', 'masterbuilder.jpg', 'masterbuilder.jpg') | |
p = sub.Popen(['file', 'masterbuilder.jpg'],stdout=sub.PIPE,stderr=sub.PIPE) | |
output, errors = p.communicate() | |
print(output) | |
def lambda_handler(event, context): | |
getObj() | |
# TODO implement | |
return 'Complete' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment