Last active
June 25, 2021 09:04
-
-
Save em-shea/e60d0ba082f67deaab34b381b7682af2 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
# Mock S3 new file uploaded event | |
def s3_upload_event(self, file_name): | |
return { | |
"Records":[ | |
{ | |
"eventVersion":"2.1", | |
"eventSource":"aws:s3", | |
"awsRegion":"us-east-1", | |
"eventTime":"2021-06-18T16:03:17.567Z", | |
"eventName":"ObjectCreated:Put", | |
"userIdentity":{ | |
"principalId":"AWS:AIDAI7123123XY" | |
}, | |
"requestParameters":{ | |
"sourceIPAddress":"12.21.123.69" | |
}, | |
"responseElements":{ | |
"x-amz-request-id":"D104123123BXXE", | |
"x-amz-id-2":"DJH/123123/123/76dtHg7yYQ+LHws0xBUmqUrM5bdW" | |
}, | |
"s3":{ | |
"s3SchemaVersion":"1.0", | |
"configurationId":"677496ca-4ead-123-123-123", | |
"bucket":{ | |
"name":"my-bucket-name", | |
"ownerIdentity":{ | |
"principalId":"A3123123AR5" | |
}, | |
"arn":"arn:aws:s3:::my-bucket-name" | |
}, | |
"object":{ | |
"key":file_name, | |
"size":24, | |
"eTag":"06a83081d2bb215", | |
"sequencer":"0060CCC3C" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment