No results for

Powered byAlgolia

S3Client.deleteObject(bucketName, objectKey)

S3Client.deleteObject deletes an object from a bucket.

bucketNamestringName of the bucket to delete the object from.
objectKeystringName of the object to delete.


import exec from 'k6/execution';
import { AWSConfig, S3Client } from '';
const awsConfig = new AWSConfig(
const s3 = new S3Client(awsConfig);
const testBucketName = 'test-jslib-aws';
const testFileKey = 'bonjour.txt';
export default function () {
// Let's delete our test object
s3.deleteObject(testBucketName, testFileKey);
// And make sure it was indeed deleted
const objects = s3.listObjects();
if (objects.filter((o) => === testBucketName).length != 0) {