mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-06-02 07:27:33 +00:00
db17a62e38
* Restructure Examples folder * add README * remove v1 examples * swift format
25 lines
747 B
Swift
25 lines
747 B
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the SwiftAWSLambdaRuntime open source project
|
|
//
|
|
// Copyright (c) 2024 Apple Inc. and the SwiftAWSLambdaRuntime project authors
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
// See LICENSE.txt for license information
|
|
// See CONTRIBUTORS.txt for the list of SwiftAWSLambdaRuntime project authors
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
import AWSLambdaRuntime
|
|
|
|
// in this example we are receiving and responding with strings
|
|
|
|
let runtime = LambdaRuntime {
|
|
(event: String, context: LambdaContext) in
|
|
"Hello \(event)"
|
|
}
|
|
|
|
try await runtime.run()
|