Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

plugin breaks provider.deploymentBucket #46

@christophgysin

Description

@christophgysin

If setting:

plugins:
  - serverless-plugin-optimize
provider:
  name: aws
  deploymentBucket: my-deployment-bucket

deployment fails with:

Serverless: Validating template...

  Error --------------------------------------------------

  The CloudFormation template is invalid: Template format error: Unresolved resource dependencies [ServerlessDeploymentBucket] in the Resources block of the template

Looking at the generated CloudFormation template:

--- cloudformation-template-update-stack.json   2017-08-03 16:26:54.695489014 +0300
+++ cloudformation-template-update-stack.json   2017-08-03 16:04:48.612095055 +0300
@@ -86,11 +86,13 @@
       "Type": "AWS::Lambda::Function",
       "Properties": {
         "Code": {
-          "S3Bucket": "my-deployment-bucket",
-          "S3Key": "serverless/serverless-simple-http-endpoint/dev/1501766814665-2017-08-03T13:26:54.665Z/serverless-simple-http-endpoint.zip"
+          "S3Bucket": {
+            "Ref": "ServerlessDeploymentBucket"
+          },
+          "S3Key": "serverless/serverless-simple-http-endpoint/dev/1501765330724-2017-08-03T13:02:10.724Z/serverless-simple-http-endpoint.zip"
         },
         "FunctionName": "serverless-simple-http-endpoint-dev-currentTime",
-        "Handler": "handler.endpoint",
+        "Handler": "_optimize/serverless-simple-http-endpoint-dev-currentTime/handler.endpoint",
         "MemorySize": 1024,
         "Role": {
           "Fn::GetAtt": [

It seems that the plugin interferes with the S3Bucket definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions