No results for

Powered byAlgolia

Bucket is returned by the S3Client.* methods that query S3 buckets. Namely, listBuckets() returns an array of Bucket objects. The Bucket object describes an Amazon S3 bucket.

NameTypeDescription
Bucket.namestringThe S3 bucket's name
Bucket.creationDateDateThe S3 bucket's creationDate

Example

import { AWSConfig, S3Client } from 'https://jslib.k6.io/aws/0.4.0/s3.js';
const awsConfig = new AWSConfig(
__ENV.AWS_REGION,
__ENV.AWS_ACCESS_KEY_ID,
__ENV.AWS_SECRET_ACCESS_KEY
);
const s3 = new S3Client(awsConfig);
export default function () {
// List the buckets the AWS authentication configuration
// gives us access to.
const buckets = s3.listBuckets();
console.log(JSON.stringify(buckets));
}