-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Describe the story
Create a wrapper utility for the AWS SDK S3Client. This should simplify the creation of the AWS SDK S3 client and it should store the created instance as a singleton for reuse across Lambda function invocations.
The wrapper should provide helper functions that simplify interaction with the following operations:
- List Buckets
- List Objects (V2)
- Delete Object
- Get Object
- Put Object
- Rename Object
The wrapper should provide a getter which returns the singleton instance of the S3Client.
Acceptance criteria
GIVEN the app initializes an instance of the S3 client
WHEN no parameters are supplied to the initializer
THEN an instance of the client is created using the default configuration for the S3Client
WHEN the S3ClientConfig is provided to the initializer
THEN the S3Client instance is constructed using the supplied configuration
WHEN the S3Client instances are constructed
THEN they are cached as singleton instances
GIVEN that any operation helper function is invoked (e.g. List Buckets, etc.)
WHEN the singleton instance does not exist
THEN a S3Client instance is constructed with default configuration
AND the instance is cached as the singleton
AND the instance is used by the helper function
WHEN the singleton instance already exists
THEN the instance is used by the helper function
Additional context
Reference existing AWS SDK wrapper utilities for the implementation approach.
Update and create project documentation for the S3 client.