Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Examples/quoteapi/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/apple/swift-openapi-generator.git", from: "1.4.0"),
.package(url: "https://github.com/apple/swift-openapi-runtime.git", from: "1.8.2"),
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0-beta.3"),
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", from: "1.2.0"),
// .package(url: "https://github.com/swift-server/swift-openapi-lambda.git", from: "0.3.0"),
.package(url: "https://github.com/awslabs/swift-aws-lambda-runtime.git", from: "2.0.0"),
.package(url: "https://github.com/awslabs/swift-aws-lambda-events.git", from: "1.2.0"),
// .package(url: "https://github.com/awslabs/swift-openapi-lambda.git", from: "2.0.0"),
.package(name: "swift-openapi-lambda", path: "../.."),
.package(url: "https://github.com/swift-server/swift-service-lifecycle.git", from: "2.8.0"),
],
Expand Down
2 changes: 1 addition & 1 deletion Examples/quoteapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ This is an example application for demonstration purposes. When deploying such i
- Ensure that AWS Lambda function is configured for function-level concurrent execution limit ([concurrency documentation](https://docs.aws.amazon.com/lambda/latest/dg/lambda-concurrency.html), [configuration guide](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html))
- Check encryption settings for Lambda environment variables ([documentation](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html))
- Ensure that AWS Lambda function is configured for a Dead Letter Queue (DLQ) ([documentation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq))
- Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources ([documentation](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html), [code example](https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres))
- Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources ([documentation](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html), [code example](https://github.com/awslabs/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres))

**Note:** The `openapi.yaml` file in this example is not suited for production. In real-world scenarios, you must:
1. Ensure that the global security field has rules defined
Expand Down
2 changes: 1 addition & 1 deletion Examples/quoteapi/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Description: SAM Template for QuoteService
# See: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-dlq
# - Ensure that AWS Lambda function is configured inside a VPC when it needs to access private resources
# See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html
# Code Example: https://github.com/swift-server/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres
# Code Example: https://github.com/awslabs/swift-aws-lambda-runtime/tree/main/Examples/ServiceLifecycle%2BPostgres

Globals:
Function:
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ let package = Package(
products: [.library(name: "OpenAPILambda", targets: ["OpenAPILambda"])],
dependencies: [
.package(url: "https://github.com/apple/swift-openapi-runtime.git", from: "1.8.2"),
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0-beta.3"),
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", from: "1.2.0"),
.package(url: "https://github.com/awslabs/swift-aws-lambda-runtime.git", from: "2.0.0"),
.package(url: "https://github.com/awslabs/swift-aws-lambda-events.git", from: "1.2.0"),
],
targets: [
.target(
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build & Test on GitHub](https://github.com/swift-server/swift-openapi-lambda/actions/workflows/pull_request.yml/badge.svg)](https://github.com/swift-server/swift-openapi-lambda/actions/workflows//pull_request.yml)
[![Build & Test on GitHub](https://github.com/awslabs/swift-openapi-lambda/actions/workflows/pull_request.yml/badge.svg)](https://github.com/awslabs/swift-openapi-lambda/actions/workflows//pull_request.yml)

![language](https://img.shields.io/badge/swift-6.0-blue)
![language](https://img.shields.io/badge/swift-6.1-blue)
Expand Down Expand Up @@ -39,9 +39,9 @@ dependencies: [
.package(url: "https://github.com/apple/swift-openapi-runtime.git", from: "1.8.2"),

// add these three dependencies
.package(url: "https://github.com/swift-server/swift-aws-lambda-runtime.git", from: "2.0.0-beta.3"),
.package(url: "https://github.com/swift-server/swift-aws-lambda-events.git", from: "1.2.0"),
.package(url: "https://github.com/swift-server/swift-openapi-lambda.git", from: "2.0.0"),
.package(url: "https://github.com/awslabs/swift-aws-lambda-runtime.git", from: "2.0.0"),
.package(url: "https://github.com/awslabs/swift-aws-lambda-events.git", from: "1.2.0"),
.package(url: "https://github.com/awslabs/swift-openapi-lambda.git", from: "2.0.0"),
],
targets: [
.executableTarget(
Expand Down Expand Up @@ -237,6 +237,6 @@ struct QuoteServiceImpl: APIProtocol, OpenAPILambdaHttpApi {
## References

- [Swift OpenAPI Generator](https://swiftpackageindex.com/apple/swift-openapi-generator/documentation) - Complete documentation and tutorials
- [Swift AWS Lambda Runtime](https://swiftpackageindex.com/swift-server/swift-aws-lambda-runtime) - Swift runtime for AWS Lambda
- [Swift AWS Lambda Runtime](https://swiftpackageindex.com/awslabs/swift-aws-lambda-runtime) - Swift runtime for AWS Lambda
- [AWS SAM](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html) - Serverless Application Model documentation
- [API Gateway Lambda Authorizers](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html) - Lambda authorization documentation