Lambda new plugins (finally!) : init, build, and deploy. feedback needed

Hey folks :waving_hand:

I've been working on new SwiftPM plugins for the AWS Lambda runtime that simplify the developer experience. The PR is up and I'd love to get some testing from the community before we merge.

What's new:

Three new plugin commands that cover the full lifecycle:

swift package lambda-init --allow-writing-to-package-directory
swift package --allow-network-connections docker lambda-build
swift package --allow-network-connections all:443 lambda-deploy
swift package --allow-network-connections all:443 lambda-deploy --delete

The deploy plugin handles IAM role creation, code upload, function creation/update, and cleanup. No more copy-pasting AWS CLI commands.

What's NOT changed:
The runtime API itself is untouched. This is purely about the build and deploy tooling.

How to test:

Point your Package.swift dependency to the branch:

.package(url: "https://github.com/awslabs/swift-aws-lambda-runtime.git", branch: "sebsto/new-plugins")

Then try the full flow: init, build, deploy, invoke, delete. Let me know what breaks.

Prerequisites: Docker installed, AWS CLI configured (aws configure).

PR with all the details: v2 Plugin System: lambda-init, lambda-build, lambda-deploy by sebsto · Pull Request #567 · awslabs/swift-aws-lambda-runtime · GitHub

Feedback welcome here or on the PR. Thanks!

4 Likes