Skip to content

Latest commit

 

History

History

s3-shared-bucket-artifacts

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Serverless Framework with shared S3 Artifacts bucket

Note: In this example, we are using Serverless Framework Pro features. Please, adapt and modify for your use case if you do not use this service.

The current folder structure in this repository is:

resources/
  s3/
    serverless.yml
services/
  serviceA/
    serverless.yml
  serviceB/
    serverless.yml
  serviceC/
    serverless.yml
.gitignore
README.md

When using Serverless Framework, the default behaviour is to create a S3 bucket for each serverless.yml file, since they are treated as separated project.

You can easily hit the soft limit of 100 S3 buckets in AWS and depending on your workload, you can even hit the 1,000 limit.

In this template, you can find a /resources/s3/serverless.yml, where we define a S3 as our artifact target that will be used by /services/service{A,B,C}.

We are reusing a single bucket for multiple projects, helping reduce the burden of creating multiple S3 buckets for Serverless Framework applications in your account.

Expected Outcome