Skip to content

bucket event notifications creates placeholder lambda function #2781

@onedotover

Description

@onedotover

Describe 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

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-s3Related to Amazon S3bugThis issue is a bug.response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions