๐Ÿ“ฆ tejanshrana / codu-serverless-meetup

๐Ÿ“„ todo_get.py ยท 12 lines
1
2
3
4
5
6
7
8
9
10
11
12import boto3

def lambda_handler(event, context):
    dynamodb=boto3.resource("dynamodb","eu-west-1")
    table=dynamodb.Table("todo-table")

    data=table.scan()
    return {
        'statusCode': 200,
        'body': data["Items"]
    }