-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy paths3-wrapper.js
More file actions
33 lines (31 loc) · 1.24 KB
/
s3-wrapper.js
File metadata and controls
33 lines (31 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { S3Client, CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetObjectCommand, ListObjectsV2Command, PutObjectCommand } from "@aws-sdk/client-s3";
export const createBucket = async (client, params) => {
const command = new CreateBucketCommand(params);
return client.send(command);
};
export const putObject = async (client, params) => {
const command = new PutObjectCommand(params);
return client.send(command);
};
export const getObject = async (client, params) => {
const command = new GetObjectCommand(params);
return client.send(command);
};
export const copyObject = async (client, params) => {
const command = new CopyObjectCommand(params);
return client.send(command);
};
export const listObjects = async (client, params) => {
const command = new ListObjectsV2Command(params);
return client.send(command);
};
export const deleteObjects = async (client, params) => {
const command = new DeleteObjectsCommand(params);
return client.send(command);
};
export const deleteBucket = async (client, params) => {
const command = new DeleteBucketCommand(params);
return client.send(command);
};