bucket event notifications creates placeholder lambda function
See original GitHub issueDescribe the bug
When you use function.addEventSource(new S3EventSource(...))
or bucket.addObjectCreatedNotification(...)
it creates a BucketNotificationsHandler lambda function with some placeholder code.
To Reproduce
const bucket = new Bucket(this, 'TestBucket');
const lambda = new Function(this, 'TestFunction', {
code: Code.asset('./test-src'),
runtime: Runtime.NodeJS10x,
handler: 'index.handler',
description: 'Example function',
});
lambda.addEventSource(new S3EventSource(bucket, {
events: [EventType.ObjectCreated],
}));
Expected behavior Should only connect the TestFunction to the lambda function not create a new placeholder function.
Version:
- macOS 10.14.5
- Typescript
- 0.33
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Manage Amazon S3 Event Notifications using a Lambda ...
The Lambda function manages S3 Event Notifications and is required to create, update, and delete notifications from events that take place ...
Read more >S3 to SQS to Lambda - Serverless Land
Create a Lambda function that resizes images uploaded to S3 via SQS. The SAM template deploys a Lambda function, an SQS queue, 2...
Read more >Triggering Lambda function on S3 file upload - 5K Team
First, you need to create the handler lambda import { S3CreateEvent } from 'aws-lambda'; export async function handler(event: ...
Read more >Create S3 Event Notification using AWS Lambda Function
Using Amazon S3 Event Notifications, you can be notified when certain events occur in your S3 bucket. Configure Amazon S3 to publish events...
Read more >Build a Realtime Notification Feed for AWS S3 - GetStream.io
Your AWS Lambda function will now be triggered whenever a user downloads, views, or uploads an object in the buckets you specified! Monitor...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My stack contains an object created notification that triggers an SNS topic. See below (using the Python API):
This creates a dummy lambda function in the stack–even though there is not and never will be a lambda target. This is annoying. Any progress on this bug?
This should be solved. I don’t understand how this went out of beta with this problem. If you run into this, it’s not just that you have a lambda function there that shouldn’t be there… the thing is you are actually PAYING for every S3 bucket event…