Skip to content

Instantly share code, notes, and snippets.

View gcbibek3353's full-sized avatar

Bivek Gharti gcbibek3353

View GitHub Profile
@gcbibek3353
gcbibek3353 / gist:ff04a15ea0df219642b3d07bed224efc
Created October 30, 2025 08:44
AWS S3 get and put object
import { GetObjectCommand, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
const accessKeyId = process.env.AWS_ACCESS_KEY_ID;
const secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY;
const bucketName = process.env.BUCKET_NAME;
const s3Client = new S3Client({
region: "ap-south-1",
credentials: {