swift/README.md
The code examples in this topic show you how to use the AWS SDK for Swift with AWS.
The AWS SDK for Swift provides a Swift API for AWS infrastructure services. Using the SDK, you can build applications on top of Amazon S3, Amazon EC2, Amazon DynamoDB, and more.
Single-service actions - Code examples that show you how to call individual service functions.
Single-service scenarios - Code examples that show you how to accomplish a specific task by calling multiple functions within the same service.
Cross-service examples - Sample applications that work across multiple AWS services.
Single-service actions and scenarios are organized by AWS service in the example_code directory. A README in each folder lists and describes how to run the examples.
There are currently no cross-service examples for the AWS SDK for Swift. To request a cross-service example, create an issue in the AWS SDK Code Examples repo.
Package.swift file to find the minimum Swift tools version required by the example.To build any of these examples from a terminal window, navigate into its directory then use the command:
$ swift build
To build one of these examples in Xcode, navigate to the example's directory
(such as the FindOrCreateIdentityPool directory, to build that example), then
type xed . to open the example directory in Xcode. You can then use standard
Xcode build and run commands.
Note: Running the tests might result in charges to your AWS account.
To run the tests for an example, use the command swift test in the example's directory.
This example code will soon be available in a container image hosted on Amazon Elastic Container Registry (ECR). This image will be pre-loaded with all Swift examples with dependencies pre-resolved, allowing you to explore these examples in an isolated environment.
⚠️ As of January 2023, the SDK for Swift image is available on ECR Public but is still undergoing active development. Refer to this GitHub issue for more information.
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0