Skip to main content
Configuration for AWS S3 storage operations. Defines the parameters needed to connect to and interact with AWS S3 storage services. Supports both standard AWS S3 and S3-compatible storage services through custom endpoints.
export interface S3Configs {
  bucket?: string;
  region?: string;
  accessKeyId?: string;
  secretAccessKey?: string;
  endpoint?: string;
}

Properties

bucket
string
Name of the S3 bucket to store files in. Must be a valid S3 bucket name following AWS naming conventions.
region
string
AWS region where the S3 bucket is located. Examples: “us-east-1”, “eu-west-1”, “ap-southeast-1”
accessKeyId
string
AWS access key ID for authentication. If undefined, will attempt to use default AWS credentials or environment variables.
secretAccessKey
string
AWS secret access key for authentication. If undefined, will attempt to use default AWS credentials or environment variables.
endpoint
string
Custom endpoint URL for S3-compatible storage services. Use this for services like MinIO, DigitalOcean Spaces, or other S3-compatible APIs. For standard AWS S3, leave this undefined.

Examples

import { uploadFileToS3, S3Configs } from "@intuned/browser";
import { BrowserContext, Page } from "playwright";
interface Params {}
export default async function handler(params: Params, page: Page, context: BrowserContext){
  // Using explicit credentials
  const s3Config: S3Configs = {
    accessKeyId: "accessKeyId",
    secretAccessKey: "SecretAccessKeyId",
    bucket: "my-app-uploads",
    region: "us-east-1"
  };
}