swift-aws-lambda-runtime
swift-aws-lambda-runtime copied to clipboard
Plugin v2 proposal
A proposal for a new set of SwiftPM plugins to facilitate the scaffolding, build, archive, and deployment of Lambda functions.
This is a call for comments to finalize the design before starting an actual implementation
What would be the output of the init plugin?
At minimum, a main.swift file. for more complex scenario, such as streaming functions, a main.swift and a SAM template.yaml file for deployment.
The idea is to scaffold your project with just 4 commands. No copy paste required.
# Step 1: Create a new Swift executable package
swift package init --type executable --name MyLambda
# Step 2: Add the Swift AWS Lambda Runtime dependency
swift package add-dependency https://github.com/swift-server/swift-aws-lambda-runtime.git --branch main
swift package add-target-dependency AWSLambdaRuntime MyLambda --package swift-aws-lambda-runtime
# Step 3: Call the lambda-init plugin
swift package lambda-init
I'm afraid the devil is in the details here. Can we write out what the expected output is?
@fabianfett I updated the proposal doc based on community feedback and your questions. There is a change log at the top.