How to use @aws-sdk/util-create-request - 1 common examples

To help you get started, we’ve selected a few @aws-sdk/util-create-request examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-samples / aws-sdk-js-v3-workshop / Exercise2 / frontend / src / libs / getObjectUrl.ts View on Github external
const getObjectUrl = async (fileName: string) => {
  const request = await createRequest(
    s3Client,
    new GetObjectCommand({
      Key: fileName,
      Bucket: config.s3Bucket
    })
  );

  const signer = new S3RequestPresigner({
    ...s3Client.config
  });

  const url = await signer.presignRequest(
    request,
    new Date(Date.now() + 60 * 60 * 1000)
  );
  // @ts-ignore

@aws-sdk/util-create-request

[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-create-request/latest.svg)](https://www.npmjs.com/package/@aws-sdk/util-create-request) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-create-request.svg)](https://www.npmjs.com/pac

Apache-2.0
Latest version published 2 days ago

Package Health Score

98 / 100
Full package analysis

Popular @aws-sdk/util-create-request functions