deamonize and cursory logging

This commit is contained in:
Josh Burman
2021-10-31 03:50:07 +00:00
parent e2099509ae
commit 449c33915f
4 changed files with 41 additions and 15 deletions

View File

@ -10,8 +10,7 @@ session = boto3.Session(
s3 = session.resource('s3', region_name=os.environ['SOLVER_AWS_REGION'])
sqs = session.client('sqs', region_name=os.environ['SOLVER_AWS_REGION'])
def get_key_from_message(message):
body = json.loads(message['Body'])
def get_key_from_message(body):
return body['Records'][0]['s3']['object']['key']
def get_object(key, bucket):