Browse articles

Object storage

# Using AWS SDK v3 (Node.js) with Linuxteknosia Cloud

Examples of @aws-sdk/client-s3 and presigned URLs with a custom endpoint, region, and forcePathStyle for Linuxteknosia Cloud S3-compatible object storage.

1 min readUpdated: October 23, 2026[Baca dalam Bahasa Indonesia](/docs/nodejs)

AWS SDK for JavaScript v3 supports custom endpoints. Set `endpoint`, `region`, and `forcePathStyle: true`, and every S3 command works as usual.

## 1\. Create an access key

Sign in to the dashboard and open **Object storage → Access keys → Create access key**. Copy the access key and secret key: the secret is shown only once. You can restrict the key to a single bucket and set an expiry date. Use the bucket name exactly as shown in the dashboard (Object storage). Bucket names are global, so replace the example `media-example-co` in this guide with your own bucket name.

## 2\. Install the SDK

```bash
npm install @aws-sdk/client-s3 @aws-sdk/s3-request-presigner
```

## 3\. Create a client and upload

```js
import { S3Client, PutObjectCommand, GetObjectCommand } from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";

const s3 = new S3Client({
  region: "id-jkt-1",
  endpoint: "https://storage.linuxteknosia.cloud",
  forcePathStyle: true,
  credentials: { accessKeyId: process.env.LT_KEY!, secretAccessKey: process.env.LT_SECRET! },
});

await s3.send(new PutObjectCommand({ Bucket: "media-example-co", Key: "avatar/1.webp", Body: file }));
```

## 4\. Presigned URL for downloads

```js
const url = await getSignedUrl(
  s3,
  new GetObjectCommand({ Bucket: "media-example-co", Key: "avatar/1.webp" }),
  { expiresIn: 900 },
);
```

## See also

-   [How to use the AWS CLI with Linuxteknosia Cloud](/docs/aws-cli)
-   [Configure the Laravel filesystem with a custom S3 endpoint](/docs/laravel)
-   [How to use rclone with Linuxteknosia Cloud](/docs/rclone)

Still need help?

Open a support ticket from the dashboard and our team will reply as soon as possible.

[Help center](/en/help)[Open a ticket](/app/support/new)