Skip to content

Commit 2fc1840

Browse files
author
Grant Cooksey
committed
Fix lambda handler name
1 parent ffdd22d commit 2fc1840

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ want to configure the function further, such as adding environment variables or
162162
Alternatively to doing this in your cli, you can create the function inside the aws lambda console.
163163

164164
```bash
165-
aws lambda create-function --function-name FUNCTION_NAME --role IAM_ROLE_ARN --handler app.lambda_handler --runtime python3.6 --code S3Bucket=S3_BUCKET_NAME,S3Key=FUNCTION_NAME.zip
165+
aws lambda create-function --function-name FUNCTION_NAME --role IAM_ROLE_ARN --handler service.app.lambda_handler --runtime python3.6 --code S3Bucket=S3_BUCKET_NAME,S3Key=FUNCTION_NAME.zip
166166
```
167167

168168
The function has been created. You can [invoke](https://docs.aws.amazon.com/cli/latest/reference/lambda/invoke.html)

examples/list_objects_s3/src/list_objects_s3/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def lambda_handler(event, context):
1414
logger.info(f'Calling out to {S3_BUCKET} bucket to list objects')
1515
s3_client = boto3.client('s3')
1616

17+
# Get all the objects from the bucket. Max 1000
1718
objects_in_bucket = s3_client.list_objects(Bucket=S3_BUCKET)
1819

1920
logger.info('Found {} objects in the bucket. Printing a sample...'.format(len(objects_in_bucket['Contents'])))

0 commit comments

Comments
 (0)