如何在插件中请求 DynamoDB.DocumentClient 服务?

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

要在插件中发出 AWS 请求,您可以这样做:

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

如何请求DynamoDB.DocumentClient

awsProvider.js,好像也没有办法。如果是这样,是否有任何解决方法?

现在无服务器支持 1.59.0https://github.com/serverless/serverless/releases/tag/v1.59.0 (code change: https://github.com/serverless/serverless/pull/7031)