Created
March 12, 2018 20:09
-
-
Save jastang/0cb1fb593b381e6b7005963fe7568f12 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
def lambda_handler(event, context): | |
if event is None: | |
print("Couldn't find the object or byte range!") | |
return | |
# The byte range is passed from the Chunking function | |
start_byte = event['start_byte'] | |
end_byte = event['end_byte'] | |
bucket = event['bucket'] | |
key = event['key'] | |
object = s3.get_object(Bucket=bucket, Key=key, Range='bytes={}-{}'.format(start_byte, end_byte)) | |
# Do your basic cleaning | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment