swift/example_code/lambda/README.md
Shows how to use the AWS SDK for Swift to work with AWS Lambda.
<!--custom.overview.start--> <!--custom.overview.end-->Lambda allows you to run code without provisioning or managing servers.
For prerequisites, see the README in the swift folder.
Code examples that show you how to perform the essential operations within a service.
Code excerpts that show you how to call individual service functions.
To build any of these examples from a terminal window, navigate into its directory, then use the following command:
$ swift build
To build one of these examples in Xcode, navigate to the example's directory
(such as the ListUsers 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.
This example shows you how to do the following:
This example consists of the main program and two AWS Lambda functions. To build and deploy it:
increment lambda function (cd increment && swift build).increment lambda function for use as a Lambda function:
swift package archive --allow-network-connections docker. When archiving
is complete, the archive's path is displayed. Take note of it.calculator lambda function (cd ../calculator && swift build).swift package archive --allow-network-connections docker. Take note of this created Zip file's
path, too.lambda-basics directory.swift run lambda-basics --incpath <path-of-increment-archive> --calcpath <path-of-calculator-archive>.⚠ Running tests might result in charges to your AWS account.
To find instructions for running these tests, see the README
in the swift folder.
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0