optimised-ocr / folder.py
Mallisetty Siva Mahesh
updated s3 bucket
bc81c34
raw
history blame contribute delete
612 Bytes
import boto3
# AWS credentials (if not set in environment variables or AWS CLI config)
from dotenv import load_dotenv
import os
# Load .env file
load_dotenv()
# Access variables
AWS_ACCESS_KEY_ID = os.getenv("AWS_ACCESS_KEY_ID")
AWS_SECRET_ACCESS_KEY = os.getenv("AWS_SECRET_ACCESS_KEY")
print("AWS_ACCESS_KEY_ID",AWS_ACCESS_KEY_ID)
print("AWS_SECRET_ACCESS_KEY",AWS_SECRET_ACCESS_KEY)
# Initialize S3 client
s3 = boto3.client('s3')
bucket_name = "edgekycdocs"
folder_name = "cinllpindocs"
s3.put_object(Bucket=bucket_name, Key=folder_name)
print(f"Folder '{folder_name}' created in bucket '{bucket_name}'")