-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/aws-s3Related to Amazon S3Related to Amazon S3@aws-cdk/aws-s3-notificationseffort/largeLarge work item – several weeks of effortLarge work item – several weeks of effortfeature-requestA feature should be added or improved.A feature should be added or improved.feature/enhancementA new API to make things easier or more intuitive. A catch-all for general feature requests.A new API to make things easier or more intuitive. A catch-all for general feature requests.in-progressThis issue is being actively worked on.This issue is being actively worked on.management/roadmapRelated to project public timeline/roadmapRelated to project public timeline/roadmapp1
Description
The use case is fairly simple, creating a new lambda function and attaching an event source from an existing S3 bucket of object creation.
following example code:
const exampleBucket = Bucket.import(this, 'example-bucket', {bucketArn: 'arn:aws:s3:::example-bucket-arn'});
fn.addEventSource(new S3EventSource(exampleBucket, { events: [EventType.ObjectCreated] }));
This code has a type mismatch (ImportedBucket vs Bucket), and doesn't work regardless.
Is there another way to use an existing bucket for an S3 event source?
Additional 2x👍 from duplicated issues
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-s3Related to Amazon S3Related to Amazon S3@aws-cdk/aws-s3-notificationseffort/largeLarge work item – several weeks of effortLarge work item – several weeks of effortfeature-requestA feature should be added or improved.A feature should be added or improved.feature/enhancementA new API to make things easier or more intuitive. A catch-all for general feature requests.A new API to make things easier or more intuitive. A catch-all for general feature requests.in-progressThis issue is being actively worked on.This issue is being actively worked on.management/roadmapRelated to project public timeline/roadmapRelated to project public timeline/roadmapp1