Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 express one bucket support #749

Merged
merged 10 commits into from
Dec 18, 2024
Merged

S3 express one bucket support #749

merged 10 commits into from
Dec 18, 2024

Conversation

adam-fowler
Copy link
Member

Create new client and s3 service for accessing S3 express one bucket zonal endpoints. This PR requires soto-project/soto-core#629 to work

let client = AWSClient()
let s3 = S3(client: client)
let bucket = "my-bucket--euw1-az1--x-s3"
// Create directory bucket
try await Self.s3.createBucket(
    bucket: bucket,
    createBucketConfiguration: .init(
        bucket: .init(dataRedundancy: .singleAvailabilityZone, type: .directory),
        location: .init(name: "euw1-az1", type: .availabilityZone)
    )
)
// need s3Express client to access directory bucket
let (expressClient, expressS3) = s3.createS3ExpressClientAndService(bucket: bucket)
let response = try await expressS3.getObject(bucket: bucket, key: "my-file")
try await expressClient.shutdown()
try await client.shutdown()

@adam-fowler adam-fowler merged commit 3b62b62 into main Dec 18, 2024
5 checks passed
@adam-fowler adam-fowler deleted the s3-express branch December 18, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant