How AWSClient and Service Objects work together
mainTo interact with AWS, you must use two primary abstractions:
AWSClient: Manages the underlying communication with AWS, including HTTP client management and request signing. You typically create one client for your application lifecycle.- Service Object: A service-specific object (e.g.,
S3,DynamoDB) that you initialize with anAWSClientand a specificregion. The service object provides the high-level API for that specific AWS service.
Every service call is a direct mapping of the corresponding AWS REST API.
import SotoS3
let client = AWSClient(credentialProvider: .static(accessKeyId: "ID", secretAccessKey: "KEY"), httpClientProvider: .createNew)
let s3 = S3(client: client, region: .uswest2)