How do you request the DynamoDB.DocumentClient service in a plugin?

47 Views Asked by At

To make AWS requests in a plugin, you can do something like this:

  constructor(serverless, options) {
    ...
    this.provider = serverless.getProvider('aws');
  }
    ...
  hook() {
    ...
    await this.provider.request('S3', 'put', params);
  }

How do you request DynamoDB.DocumentClient?

Looking at awsProvider.js, it seems like there is no way to do so. If so, are there any workarounds?

1

There are 1 best solutions below

1
neverendingqs On BEST ANSWER