# Manage S3 Event Notifications Using Lambda --- ![Stability: Stable](https://img.shields.io/badge/stability-Stable-success.svg?style=for-the-badge) > **This is a stable example. It should successfully build out of the box** > > This example uses the core CDK library, and does not have any infrastructure prerequisites to build. --- This example uses Lambda to manage event notifications for an S3 bucket. The solution allows other stacks to define their own event notifications on a shared bucket. View the AWS blog post here: https://aws.amazon.com/blogs/infrastructure-and-automation/manage-amazon-s3-event-notifications-using-lambda-function/ ## Build To build this app, you need to be in this example's root folder. Then run the following: ```bash npm install -g aws-cdk npm install npm run build ``` This will install the necessary CDK, then this example's dependencies, and then build your TypeScript files and your CloudFormation template. ## Deploy Run ```cdk deploy```. This will deploy / redeploy your Stack to your AWS Account. After the deployment you will see the API's URL, which represents the url you can then use. ## Synthesize Cloudformation Template To see the Cloudformation template generated by the CDK, run cdk synth, then check the output file in the "cdk.out" directory. ## The Component Structure This whole component contains: * A shared resources stack with an S3 bucket shared by multiple stacks and a Lambda function which manages the S3 bucket event notifications * A stack to configure S3 event notifications on the shared bucket to an SQS queue * A stack to configure S3 event notifications on the shared bucket to an SNS topic