Complete the code to specify the AWS service that triggers the Lambda function.
"Events": ["[1]"],
The event type s3:ObjectCreated:* triggers the Lambda function when an object is created in the S3 bucket.
Complete the code to specify the S3 bucket name in the event source configuration.
"Bucket": "[1]",
The Bucket property should be the name of the S3 bucket that triggers the Lambda function, such as my-lambda-bucket.
Fix the error in the Lambda function handler declaration.
def [1](event, context):
The standard AWS Lambda Python handler function is named lambda_handler by convention and configuration.
Fill both blanks to correctly extract the bucket name and object key from the event.
bucket = event['Records'][0]['s3']['[1]']['[2]']
The bucket name is accessed via event['Records'][0]['s3']['bucket']['name'].
Fill both blanks to correctly extract the object key from the event.
object_key = event['Records'][0]['s3']['[1]']['[2]']
The object key is accessed via event['Records'][0]['s3']['object']['key']. The 'key' field holds the object name.