使用 AWS Lambda 的無伺服器應用程式
Claudio Canales
Senior DevOps Engineer

觸發條件
SDK 呼叫(於處理器內)


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

boto3)。


PutItem 負責寫入。GetItem 依鍵讀取。Query 尋找相關項目。
GetObject 取得內容。PutObject 寫入新的衍生檔。

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


AccessDeniedException
required action denied


PutItem 將中繼資料寫入 DynamoDB。

使用 AWS Lambda 的無伺服器應用程式