# How to deploy Lambda functions to existing S3 buckets

**URL:** <https://forum.serverless.com/t/how-to-deploy-lambda-functions-to-existing-s3-buckets/18293>\
**Category:** Serverless Framework\
**Tags:** aws, lambda, cloudformation\
**Created:** [February 7, 2023, 4:42pm UTC](https://forum.serverless.com/t/how-to-deploy-lambda-functions-to-existing-s3-buckets/18293 "2023-02-07T16:42:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sfxpt](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sfxpt](https://forum.serverless.com/u/sfxpt)\
**Post date:** [February 7, 2023, 4:42pm UTC](https://forum.serverless.com/t/how-to-deploy-lambda-functions-to-existing-s3-buckets/18293/1 "2023-02-07T16:42:36Z")

</div>

Following up on [Delete S3 buckets after deployment](https://forum.serverless.com/t/delete-s3-buckets-after-deployment/5208)

I’ve precreated a common bucket and want to configure all my serverless.yml deployments to use that one rather than creating new ones all the time.

However, unlike

> [@Serverless deploy creating empty S3 buckets](https://forum.serverless.com/t/serverless-deploy-creating-empty-s3-buckets/5817):
>
> Hello, Has anybody here experienced deploying a serverless golang api to AWS lambda where it automatically created empty S3 buckets but never used it? In my serverless.yml, I have already set the deploymentBucket to a specific S3 bucket name and it was correctly used during deployment but I am not sure why the other S3 buckets were created automatically and never used during deployment.

I wasn’t even able to make use of that common bucket at all.

I’ve removed my whole service stack from AWS, removed local `.serverless` folder and redid `sls deploy`. However, on checking the newly created application, it’s creating a brand new S3 buckets _again_, not using my specified one at all. I did my config following:

**Using existing buckets**

> **[Serverless Framework - AWS Lambda Events - S3](https://www.serverless.com/framework/docs/providers/aws/events/s3#using-existing-buckets)**
>
> The Serverless Framework documentation for AWS Lambda, API Gateway, EventBridge, DynamoDB and much more.

I.e.,

```yaml
	
functions:
  users:
    handler: users.handler
    events:
      - s3:
          bucket: legacy-one
          event: s3:ObjectCreated:*
          existing: true

```

while omitting these from the doc:

```auto
          rules:
            - prefix: uploads/
            - suffix: .jpg

```

Please help.

---

<div class="post-metadata">

**Author:** ![sfxpt](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sfxpt](https://forum.serverless.com/u/sfxpt)\
**Post date:** [February 7, 2023, 5:15pm UTC](https://forum.serverless.com/t/how-to-deploy-lambda-functions-to-existing-s3-buckets/18293/2 "2023-02-07T17:15:27Z")

</div>

I don’t think adding `forceDeploy: true` would help, but I added it afterwards anyway.  
Now I’m sure that it wouldn’t help.

---

<div class="post-metadata">

**Author:** ![sfxpt](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sfxpt](https://forum.serverless.com/u/sfxpt)\
**Post date:** [February 23, 2023, 7:41pm UTC](https://forum.serverless.com/t/how-to-deploy-lambda-functions-to-existing-s3-buckets/18293/3 "2023-02-23T19:41:16Z")

</div>

Just want to bump up this question in an attempt to draw more attention.

---

<div class="post-metadata">

**Author:** ![TomC](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/tomc/32/4002_2.png) [@TomC](https://forum.serverless.com/u/TomC)\
**Post date:** [April 15, 2025, 11:48am UTC](https://forum.serverless.com/t/how-to-deploy-lambda-functions-to-existing-s3-buckets/18293/4 "2025-04-15T11:48:18Z")

</div>

> **[Serverless Plugin Existing S3 - Serverless Framework: Plugins](https://www.serverless.com/plugins/serverless-plugin-existing-s3)**
>
> Overcomes the CloudFormation limitation on attaching an event to an uncontrolled bucket, for Serverless.com 1.11.0+.
