Skip to content

Conversation

sebsto
Copy link
Contributor

@sebsto sebsto commented Dec 25, 2024

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

@sebsto sebsto added the semver/none No version bump required. label Dec 25, 2024
@sebsto sebsto self-assigned this Dec 25, 2024
@fabianfett
Copy link
Member

What would be the output of the init plugin?

@sebsto
Copy link
Contributor Author

sebsto commented Mar 7, 2025

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

@fabianfett
Copy link
Member

I'm afraid the devil is in the details here. Can we write out what the expected output is?

@sebsto
Copy link
Contributor Author

sebsto commented Mar 13, 2025

@fabianfett I updated the proposal doc based on community feedback and your questions. There is a change log at the top.

@sebsto sebsto enabled auto-merge (squash) June 1, 2025 17:00
@sebsto sebsto disabled auto-merge July 2, 2025 12:20
@sebsto sebsto merged commit bf2385a into swift-server:main Jul 2, 2025
32 checks passed
@sebsto sebsto deleted the sebsto/new-plugin-proposal branch July 4, 2025 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants