Access S3 buckets With AWS S3 Client SDK
ตัวอย่างเบื้องต้นสำหรับกาเข้าใช้งาน Object storage (S3) ด้วย NodeJS ผ่าน AWS S3 Client SDK
Last updated
import { S3Client, ListBucketsCommand } from "@aws-sdk/client-s3";import { S3Client, ListBucketsCommand } from "@aws-sdk/client-s3";
const client = new S3Client({
/** configuration */
});
const params = {
/** input parameters */
};
const command = new ListBucketsCommand(params);
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
}