Skip to content

Fn::ImportValue does not work #57

@Katafalkas

Description

@Katafalkas

I am trying to Import bucket name:

custom:
  assets:
    auto: true # run automatically after deploy command
    targets:
      - bucket:
          Fn::ImportValue: persistent-provenance-${self:provider.stage}-MachineLearningResourcesBucketName
...

Or use variable that imports bucket name:

custom:
  mlBucketName:
    Fn::ImportValue: persistent-provenance-${self:provider.stage}-MachineLearningResourcesBucketName
  assets:
    auto: true # run automatically after deploy command
    targets:
      - bucket: ${self:custom.mlBucketName}
...

None of the options work. I get the error:

  Error: Invalid bucket name [object Object]
      at Assets.resolveBucket (/.../node_modules/serverless-s3-deploy/index.js:107:31)
      at BbPromise.map.concurrency (/.../node_modules/serverless-s3-deploy/index.js:149:23)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions