1
2
3
4
5
6
7
8
9
10
11
12
import { S3Client } from "https://deno.land/x/s3_lite_client@0.6.1/mod.ts"
const s3client = new S3Client({
endPoint: "s3.amazonaws.com",
region: "us-east-1",
bucket: "test-bucket",
accessKey: Deno.env.get("awsS3Key"),
secretKey: Deno.env.get("awsS3Secret"),
});
const upload = await s3client.putObject("filename.txt", "File contents");
console.log(upload)
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
May 13, 2024