Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AWS Lambda for Amazon DynamoDB daily resize (Python handler)
import os
from resizer import DailyResize
def daily_resize(event, context):
operation = event['Operation']
resizer = DailyResize(table_prefix=os.environ['TABLE_NAME'])
if operation == 'create_new':
resizer.create_new()
elif operation == 'resize_old':
resizer.resize_old()
else:
raise ValueError("Invalid operation")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.