# SDK – Node.js (AWS SDK v3)

Interact with Aurora using the AWS SDK for JavaScript v3.

> Available S3 endpoint: `a-s3.aur.lu` (France, Albi).

## Install

```bash
npm i @aws-sdk/client-s3
```

## Configure client

```typescript
import { S3Client, ListBucketsCommand, PutObjectCommand, GetObjectCommand } from "@aws-sdk/client-s3";

const s3 = new S3Client({
  endpoint: "https://a-s3.aur.lu",
  region: "us-east-1",
  credentials: {
    accessKeyId: process.env.AURORA_ACCESS_KEY!,
    secretAccessKey: process.env.AURORA_SECRET_KEY!,
  },
  forcePathStyle: true,
});

async function main() {
  const buckets = await s3.send(new ListBucketsCommand({}));
  console.log(buckets.Buckets);

  await s3.send(new PutObjectCommand({
    Bucket: "my-bucket",
    Key: "file.txt",
    Body: Buffer.from("hello"),
  }));
}

main().catch(console.error);
```
