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
2 changes: 1 addition & 1 deletion .github/workflows/scripts/check-archive-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ZIP_FILE=${OUTPUT_DIR}/MyLambda/MyLambda.zip
pushd "Examples/${EXAMPLE}" || exit 1

# package the example (docker and swift toolchain are installed on the GH runner)
LAMBDA_USE_LOCAL_DEPS=../.. swift package archive --allow-network-connections docker || exit 1
LAMBDA_USE_LOCAL_DEPS=../.. swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023 || exit 1

# did the plugin generated a Linux binary?
[ -f "${OUTPUT_FILE}" ]
Expand Down
2 changes: 1 addition & 1 deletion Examples/APIGatewayV1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To build the package, type the following commands.

```bash
swift build
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand Down
2 changes: 1 addition & 1 deletion Examples/APIGatewayV1/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/APIGatewayLambda/APIGatewayLambda.zip
Timeout: 60
Handler: swift.bootstrap # ignored by the Swift runtime
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand Down
2 changes: 1 addition & 1 deletion Examples/APIGatewayV2+LambdaAuthorizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To build the package, type the following commands.

```bash
swift build
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there are two ZIP files ready to deploy, one for the authorizer function and one for the business function.
Expand Down
4 changes: 2 additions & 2 deletions Examples/APIGatewayV2+LambdaAuthorizer/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/APIGatewayLambda/APIGatewayLambda.zip
Timeout: 60
Handler: swift.bootstrap # ignored by the Swift runtime
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand All @@ -75,7 +75,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/AuthorizerLambda/AuthorizerLambda.zip
Timeout: 29 # max 29 seconds for Lambda authorizers
Handler: swift.bootstrap # ignored by the Swift runtime
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand Down
2 changes: 1 addition & 1 deletion Examples/APIGatewayV2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To build the package, type the following commands.

```bash
swift build
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand Down
2 changes: 1 addition & 1 deletion Examples/APIGatewayV2/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/APIGatewayLambda/APIGatewayLambda.zip
Timeout: 60
Handler: swift.bootstrap # ignored by the Swift runtime
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand Down
4 changes: 2 additions & 2 deletions Examples/BackgroundTasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Once the struct is created and the `handle(...)` method is defined, the sample c
To build & archive the package, type the following commands.

```bash
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand All @@ -42,7 +42,7 @@ AWS_ACCOUNT_ID=012345678901
aws lambda create-function \
--function-name BackgroundTasks \
--zip-file fileb://.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/BackgroundTasks/BackgroundTasks.zip \
--runtime provided.al2 \
--runtime provided.al2023 \
--handler provided \
--architectures arm64 \
--role arn:aws:iam::${AWS_ACCOUNT_ID}:role/lambda_basic_execution \
Expand Down
2 changes: 1 addition & 1 deletion Examples/CDK/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To build the package, type the following commands.

```bash
swift build
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand Down
4 changes: 2 additions & 2 deletions Examples/HelloJSON/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The function return value will be encoded to a `HelloResponse` as your Lambda fu
To build & archive the package, type the following commands.

```bash
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand All @@ -38,7 +38,7 @@ AWS_ACCOUNT_ID=012345678901
aws lambda create-function \
--function-name HelloJSON \
--zip-file fileb://.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/HelloJSON/HelloJSON.zip \
--runtime provided.al2 \
--runtime provided.al2023 \
--handler provided \
--architectures arm64 \
--role arn:aws:iam::${AWS_ACCOUNT_ID}:role/lambda_basic_execution
Expand Down
4 changes: 2 additions & 2 deletions Examples/HelloWorld/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ To build & archive the package, type the following commands.

```bash
swift build
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand All @@ -61,7 +61,7 @@ Here is how to deploy using the `aws` command line.
aws lambda create-function \
--function-name MyLambda \
--zip-file fileb://.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/MyLambda/MyLambda.zip \
--runtime provided.al2 \
--runtime provided.al2023 \
--handler provided \
--architectures arm64 \
--role arn:aws:iam::<YOUR_ACCOUNT_ID>:role/lambda_basic_execution
Expand Down
4 changes: 2 additions & 2 deletions Examples/HelloWorldNoTraits/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To build & archive the package, type the following commands.

```bash
swift build
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand All @@ -67,7 +67,7 @@ Here is how to deploy using the `aws` command line.
aws lambda create-function \
--function-name MyLambda \
--zip-file fileb://.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/MyLambda/MyLambda.zip \
--runtime provided.al2 \
--runtime provided.al2023 \
--handler provided \
--architectures arm64 \
--role arn:aws:iam::<YOUR_ACCOUNT_ID>:role/lambda_basic_execution
Expand Down
2 changes: 1 addition & 1 deletion Examples/HummingbirdLambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To build the package, type the following commands.

```bash
swift build
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand Down
2 changes: 1 addition & 1 deletion Examples/HummingbirdLambda/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/HBLambda/HBLambda.zip
Timeout: 60
Handler: swift.bootstrap # ignored by the Swift runtime
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand Down
2 changes: 1 addition & 1 deletion Examples/JSONLogging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ AWS_LAMBDA_LOG_FORMAT=JSON swift run

```bash
swift build
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

The deployment package will be at:
Expand Down
2 changes: 1 addition & 1 deletion Examples/ManagedInstances/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ arn:aws:lambda:us-west-2:486652066693:capacity-provider:TestEC2

```bash
# Build and package the Swift Lambda function
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023

# Change the values below to match your setup
REGION=us-west-2
Expand Down
2 changes: 1 addition & 1 deletion Examples/MultiSourceAPI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Based on the successfully decoded type, it returns an appropriate response.
## Building

```bash
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

## Deploying
Expand Down
2 changes: 1 addition & 1 deletion Examples/MultiSourceAPI/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Resources:
Properties:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/MultiSourceAPI/MultiSourceAPI.zip
Handler: provided
Runtime: provided.al2
Runtime: provided.al2023
Architectures:
- arm64
MemorySize: 256
Expand Down
2 changes: 1 addition & 1 deletion Examples/MultiTenant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ requestParameters:

1. **Build the Lambda function**:
```bash
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

2. **Deploy using SAM**:
Expand Down
4 changes: 2 additions & 2 deletions Examples/ResourcesPackaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ curl -d '"hello"' http://127.0.0.1:7000/invoke
To build & archive the package, type the following commands.

```bash
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand All @@ -63,7 +63,7 @@ Here is how to deploy using the `aws` command line.
aws lambda create-function \
--function-name MyLambda \
--zip-file fileb://.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/MyLambda/MyLambda.zip \
--runtime provided.al2 \
--runtime provided.al2023 \
--handler provided \
--architectures arm64 \
--role arn:aws:iam::<YOUR_ACCOUNT_ID>:role/lambda_basic_execution
Expand Down
4 changes: 2 additions & 2 deletions Examples/S3EventNotifier/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To build & archive the package you can use the following commands:

```bash
swift build
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there are no errors, a ZIP file should be ready to deploy, located at `.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/S3EventNotifier/S3EventNotifier.zip`.
Expand All @@ -41,7 +41,7 @@ aws lambda create-function \
--region "${REGION}" \
--function-name S3EventNotifier \
--zip-file fileb://.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/S3EventNotifier/S3EventNotifier.zip \
--runtime provided.al2 \
--runtime provided.al2023 \
--handler provided \
--architectures arm64 \
--role arn:aws:iam::<YOUR_ACCOUNT_ID>:role/lambda_basic_execution
Expand Down
2 changes: 1 addition & 1 deletion Examples/S3_AWSSDK/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To build the package, type the following commands.

```bash
swift build
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand Down
2 changes: 1 addition & 1 deletion Examples/S3_AWSSDK/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/AWSSDKExample/AWSSDKExample.zip
Timeout: 60
Handler: swift.bootstrap # ignored by the Swift runtime
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand Down
2 changes: 1 addition & 1 deletion Examples/S3_Soto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To build the package, type the following command.

```bash
swift build
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand Down
2 changes: 1 addition & 1 deletion Examples/S3_Soto/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/SotoExample/SotoExample.zip
Timeout: 60
Handler: swift.bootstrap # ignored by the Swift runtime
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand Down
2 changes: 1 addition & 1 deletion Examples/ServiceLifecycle+Postgres/INFRASTRUCTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The infrastructure consists of a secure VPC setup with private subnets only, con
## Lambda Function Configuration

### Service Lifecycle Lambda
- **Runtime**: Custom runtime (provided.al2)
- **Runtime**: Custom runtime (provided.al2023)
- **Architecture**: ARM64
- **Memory**: 128MB
- **Timeout**: 60 seconds
Expand Down
2 changes: 1 addition & 1 deletion Examples/ServiceLifecycle+Postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The Lambda function uses the following environment variables for database connec

1. **Build the Lambda function:**
```bash
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

2. **Deploy with SAM:**
Expand Down
2 changes: 1 addition & 1 deletion Examples/ServiceLifecycle+Postgres/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/LambdaWithServiceLifecycle/LambdaWithServiceLifecycle.zip
Timeout: 60
Handler: swift.bootstrap # ignored by the Swift runtime
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand Down
4 changes: 2 additions & 2 deletions Examples/Streaming+APIGateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Once the struct is created and the `handle(...)` method is defined, the sample c
To build & archive the package, type the following commands.

```bash
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand Down Expand Up @@ -111,7 +111,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/StreamingNumbers/StreamingNumbers.zip
Timeout: 60 # Must be bigger than the time it takes to stream the output
Handler: swift.bootstrap
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand Down
2 changes: 1 addition & 1 deletion Examples/Streaming+APIGateway/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/StreamingNumbers/StreamingNumbers.zip
Timeout: 60 # Must be bigger than the time it takes to stream the output
Handler: swift.bootstrap # ignored by the Swift runtime
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand Down
6 changes: 3 additions & 3 deletions Examples/Streaming+Codable/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Key features demonstrated:
To build & archive the package, type the following commands.

```bash
swift package archive --allow-network-connections docker
swift package archive --allow-network-connections docker --base-docker-image swift:amazonlinux2023
```

If there is no error, there is a ZIP file ready to deploy.
Expand Down Expand Up @@ -119,7 +119,7 @@ AWS_ACCOUNT_ID=012345678901
aws lambda create-function \
--function-name StreamingFromEvent \
--zip-file fileb://.build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/StreamingFromEvent/StreamingFromEvent.zip \
--runtime provided.al2 \
--runtime provided.al2023 \
--handler provided \
--architectures arm64 \
--role arn:aws:iam::${AWS_ACCOUNT_ID}:role/lambda_basic_execution
Expand Down Expand Up @@ -231,7 +231,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/StreamingFromEvent/StreamingFromEvent.zip
Timeout: 15
Handler: swift.bootstrap # ignored by the Swift runtime
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand Down
2 changes: 1 addition & 1 deletion Examples/Streaming+Codable/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Resources:
CodeUri: .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/StreamingCodable/StreamingCodable.zip
Timeout: 15
Handler: swift.bootstrap # ignored by the Swift runtime
Runtime: provided.al2
Runtime: provided.al2023
MemorySize: 128
Architectures:
- arm64
Expand Down
Loading
Loading