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

AWS is not defined #581

@peebles

Description

@peebles

In version 0.6.22, I am getting:

ReferenceError: AWS is not defined
at ServerlessS3Local.getClient (/Users/peebles/cortina/ca-portal/node_modules/serverless-s3-local/index.js:353:21)
at ServerlessS3Local.createBuckets (/Users/peebles/cortina/ca-portal/node_modules/serverless-s3-local/index.js:325:27)
...

And indeed, in index.js line 353 there is a reference to AWS that was never defined:

  getClient() {
    const { S3 } = require("@aws-sdk/client-s3");
    return new S3({
      s3ForcePathStyle: true,
      endpoint: new AWS.Endpoint(
        `http://${this.options.host}:${this.options.port}`
      ),
      accessKeyId: this.options.accessKeyId,
      secretAccessKey: this.options.secretAccessKey,
    });
  }

Or am I missing something here?

0.6.20 works without error.

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