swift-aws-lambda-runtime
swift-aws-lambda-runtime copied to clipboard
Replacement for Lambda.run?
I've noticed that I can no longer use Lambda.run. Docs haven't been updated yet and I'm now struggling to figure out how to use the library now. I have noticed there has not been a new release, so perhaps things are still in progress?
Normally, I'd just stick with the latest release. But, I'm working on adding a new event from Cognito. I'd prefer to work with the desired future APIs and that new repo. Does that make sense?
Thank you!
You can now extend SimpleLambdaHandler and overwrite
func handle(_ event: Event, context: AWSLambdaRuntimeCore.LambdaContext) async throws -> Output { ... }
Here are two working examples on a work branch :
HttpApi : https://github.com/swift-server/swift-aws-lambda-runtime/pull/278/files#diff-d3a9439a759f16f71aa24fe566ecaace7f888a68a91d6784de2fa25bde248136
SQS : https://github.com/swift-server/swift-aws-lambda-runtime/pull/278/files#diff-75dbefb5d87f100caceb006a6afecf71124c6d0a38893a5976b1c5ff8e32e542
made this PR to document the 1.x API. once merged we can tag a 1.0.0-alpha.1
Thanks to both of you! Those examples are great, and I'm sure docs will be awesome too.
Hey @mattmassicotte , we're closing this issue since it's been over a year since filing. If you or anyone else still has a question on this topic, let us know!
I probably should have closed this myself a while ago. Thanks again!