Amazon S3 is a cloud storage service on AWS that lets you store different types of files, like photos, audio, and
videos, as objects. It offers high scalability and security, making it easy to store and access any amount of data
from anywhere, anytime. S3 also provides features like high availability, strong security, and smooth integration with
other AWS services.
To create the AWSHandler object creation with the aws credentials.
The AWSS3Handler connects to an Amazon S3 bucket using access credentials
(access key, secret key) and specifies a region and bucket name. It enables
seamless interaction with S3 for tasks like uploading, downloading, and
managing files.
s3_handler_test.py
Copy
from superagentx_handlers.aws.s3 import AWSS3Handlers3_handler = AWSS3Handler( aws_access_key_id=os.getenv("AWS_ACCESS_KEY_ID"), aws_secret_access_key=os.getenv("AWS_SECRET_ACCESS_KEY"), bucket_name="test", region_name="eu-central-1")
File Upload:
The upload_file method accepts a file name and an object name.