def make_queue_event(data: schema.Data): s3_bucket.Object('/data/test.json').put( Body=data.to_json().encode('utf-8')) return { 'Records': [{ 'body': '/data/test.json', 'messageAttributes': { 's3FileName': { 'stringValue': '/data/test.json' } } }] }
def put(self, data: Data, path: str = ''): data_json = data.to_json().encode('utf-8') return self.put_raw(data_json, ext='json', path=path)