Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy to a specific object key inside an S3 Bucket with the Serverless framework?

Serverless framework configuration allows:

deploymentBucket:
    name: foo

However, it always creates a serverless object key inside the foo bucket. I want to be able to deploy to a different key like BAR.

deploymentBucket:
    name: foo/BAR # illustration only, doesn't work

What are my options here?

like image 938
sigmus Avatar asked Oct 05 '17 06:10

sigmus


1 Answers

I don't believe Serverless has this functionality.

Your options are

  • Raise a GitHub issue and hope someone adds the functionality for you, or
  • Write a Serverless plugin that lets you add prefixes to the objects inside the deployment bucket
like image 80
Trent Bartlem Avatar answered Nov 08 '22 16:11

Trent Bartlem