Skip to content

AmazonLinux2023 is now the default#675

Merged
sebsto merged 2 commits into
mainfrom
feat/default-amazonlinux2023
Jun 29, 2026
Merged

AmazonLinux2023 is now the default#675
sebsto merged 2 commits into
mainfrom
feat/default-amazonlinux2023

Conversation

@sebsto

@sebsto sebsto commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Starting June, 20 2026, Amazon Linux 2 has reached end of support life.
The Swift Lambda Runtime plugins now use Amazon Linux 2023 for cross compiling code.

Warning

When you compile on Amazon Linux 2023, you must deploy on Amazon Linux 2023 too

When using the console
image

When using the AWS CLI

aws lambda create-function \
    --function-name MySwiftFunction \
    --runtime provided.al2023 \
    --role "$role_arn" \ // replace with the IAM role ARN to pass to your function
    --handler bootstrap \
    --architectures arm64 \
    --zip-file "fileb://MySwiftFunction.zip"

When using SAM

Resources:
  APIGatewayLambda:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: APIGatewayLambda.zip
      Timeout: 60
      Handler: swift.bootstrap  # ignored by the Swift runtime
      Runtime: provided.al2023
      MemorySize: 128
      Architectures:
        - arm64

When using the AWS CDK

  const lambdaFunction = new lambda.Function(this, 'SwiftLambdaFunction', {
    runtime: lambda.Runtime.PROVIDED_AL2023,
    architecture: lambda.Architecture.ARM_64,
    handler: 'bootstrap',
    code: lambda.Code.fromAsset('APIGatewayLambda.zip'),
    memorySize: 128,
    timeout: cdk.Duration.seconds(30),
    environment: {
      LOG_LEVEL: 'debug',
    },
  });

@sebsto sebsto added the 🆕 semver/minor Adds new public API. label Jun 29, 2026
@sebsto sebsto self-assigned this Jun 29, 2026
@sebsto sebsto changed the title AmazonLinux2023 is now the default Release v2.11: Amazon Linux 2023 default + new plugins on Swift 6.4 Jun 29, 2026
@sebsto sebsto changed the title Release v2.11: Amazon Linux 2023 default + new plugins on Swift 6.4 AmazonLinux2023 is now the default Jun 29, 2026
@sebsto sebsto merged commit ecc20f0 into main Jun 29, 2026
29 of 155 checks passed
@sebsto sebsto deleted the feat/default-amazonlinux2023 branch June 29, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant