Function StackStorageS3
S3 Connect
Configure and establish a connection to S3 storage
Overview
Initialize a connection to S3 storage for managing file uploads, retrievals, and other storage operations.
Configuration
- Base Endpoint – The S3-compatible endpoint.
- Region (Optional) – The S3 region.
- Access Key – AWS access key. (For security, it is recommended to use environment variables instead of hardcoding credentials.)
- Secret Access Key – AWS secret key. (For security, it is recommended to use environment variables instead of hardcoding credentials.)
- Max Retry Attempts – The default number of retry attempts for S3 operations.
- Default Bucket – The default S3 bucket used for operations. If not provided, a bucket must be specified for each operation.
Outputs
- Returns a
*S3
instance, which can be registered globally using a hook function that runs when the server starts. This instance can then be used across your API for file interactions.