Serverless Applications with AWS Lambda
Claudio Canales
Senior DevOps Engineer

Trigger
Wywołanie SDK (wewnątrz handlera)


{
"Records": [{
"s3": {
"bucket": {"name": "…"},
"object": {"key": "…"}
}
}]
}

boto3).


PutItem zapisuje.GetItem odczytuje według klucza.Query wyszukuje powiązane elementy.
GetObject pobiera zawartość.PutObject zapisuje nowy plik pochodny.

import boto3
ddb = boto3.client("dynamodb")
def handler(event, context):
ddb.put_item(
TableName="files",
Item={"pk": {"S": "1"}},
)


AccessDeniedException
required action denied


PutItem zapisuje metadane do DynamoDB.

Serverless Applications with AWS Lambda