rogersgt / serverless-frontend-plugin

Serverless plugin to automate packaging and deploying a frontend UI in AWS Cloudfront and S3
MIT License
6 stars 4 forks source link

Setup custom provider.deploymentBucket #12

Open VietHo opened 2 years ago

VietHo commented 2 years ago

I noticed there was two bucket created using this plugin, one containing the static content and another one containing the cloudformation template

When I try to specify a deploymentBucket to prevent excessive number of cloudformation bucket (I want to deploy many frontends)

provider:
  name: aws
  region: eu-west-3
  deploymentBucket:
    name: my-serverless-cloudformations-bucket

I get an error even though everything seems to have been deployed alright

Error:
The CloudFormation template is invalid: Template format error: At least one Resources member must be defined.

From what I understand, setting a deploymentBucket makes the Resources part in the cloudformation template to be empty. But the cloudformation template doesn't really seem to be necessary here.

Would there be any workaround for this ? I tried to look into the plugin code but it's a bit out of my range for now

rogersgt commented 1 year ago

I was able to use the custom deploymentBucket in my vue example (see https://github.com/rogersgt/serverless-frontend-plugin/pull/17).

I'm not able to reproduce your CloudFormation issue. Is this related to serverless or serverless-frontend-plugin? Could you post your full serverless config?