> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markpdf.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS S3

> Converts from presigned S3 URLs.

\#AWS S3

```ts theme={null}
import { S3Client, GetObjectCommand } from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";

const s3 = new S3Client({ region: "eu-west-1" });

const signedUrl = await getSignedUrl(
  s3,
  new GetObjectCommand({ Bucket: "mi-bucket", Key: "docs/report.pdf" }),
  { expiresIn: 60 }
);

const res = await fetch("https://api.markpdf.tech/convert/from-url", {
  method: "POST",
  headers: {
    "x-api-key": process.env.FLASH_MD_API_KEY!,
    "content-type": "application/json"
  },
  body: JSON.stringify({ url: signedUrl, filename: "report.pdf" })
});

const markdown = await res.text();
```

Use short expirations. Do not save the signed URL in logs.
