aws-sdk-swift-usage

Write Swift code using AWS SDK clients, configs, credentials, waiters, and pagination.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill aws-sdk-swift-usage-sakicodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-sdk-swift-usage
Source: https://github.com/sakicodes/BuildFestHackathon26/tree/main/.agents/skills/aws-sdk-swift-usage
Command: npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill aws-sdk-swift-usage-sakicodes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers writing Swift applications against AWS services often misuse deprecated configuration classes, misorder config parameters, or struggle with async client setup, credential resolvers, and pagination in the aws-sdk-swift package. ## Core Features & Use Cases - Correct Client Configuration: Enforces struct-based config types like S3Client.S3ClientConfig instead of deprecated S3ClientConfiguration classes, with parameters in declaration order. - Credentials, Waiters, and Pagination: Provides patterns for static and assume-role credential resolvers, waiter usage with maxWaitTime, and paginated list operations. - Use Case: When building a Swift command-line tool that uploads files to S3 and lists DynamoDB tables, use this Skill to generate correct async client setup, presigned URLs, and paginated reads without hitting deprecated API errors. ## Quick Start Write Swift code using the AWS SDK for Swift to create an S3 client in us-west-2, upload a file, and list all objects with pagination.

Frequently Asked Questions about aws-sdk-swift-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an S3 client in Swift with AWS SDK?

Create an S3 client in Swift using try await S3Client() for auto-detected region, or build an S3Client.S3ClientConfig with a region and pass it to S3Client(config:). All operations are async, so use an async entry point like @main with static func main() async throws.

How to configure AWS region and credentials in aws-sdk-swift?

Pass region and an awsCredentialIdentityResolver to the struct config, for example S3Client.S3ClientConfig(awsCredentialIdentityResolver: resolver, region: "us-west-2"). Use StaticAWSCredentialIdentityResolver for fixed keys or STSAssumeRoleAWSCredentialIdentityResolver for role assumption.

Why is S3ClientConfiguration deprecated in AWS SDK for Swift?

S3ClientConfiguration and similar class-based configs are deprecated in favor of struct-based types like S3Client.S3ClientConfig. The struct configs require parameters in declaration order and region is always mandatory when creating a config.

Does AWS SDK for Swift support pagination for list operations?

Yes, the SDK provides paginated async sequences such as listObjectsV2Paginated. Iterate with for try await page in client.listObjectsV2Paginated(input:) and read items from each page's contents array.

How do I generate a presigned URL for S3 in Swift?

Call presignedURLForGetObject on the S3 client with a GetObjectInput and an expiration in seconds. For example, pass GetObjectInput(bucket: "my-bucket", key: "file.pdf") with expiration 3600 to get a URL valid for one hour.