tkremenek
(Ted Kremenek)
1
I am pleased to announce the launch of a new open-source Swift AWS Lambda Runtime. Details can be found on Swift.org:
https://swift.org/blog/aws-lambda-runtime
The post is authored by @tomerd, but the work was brought forth by several members of the community, with a particular shout out to @fabianfett.
Questions about the post can be asked here.
61 Likes
BigSur
({ @MainActor in M1.Ultra }(Swift))
2
Well done, big step to serverless computing.
1 Like
ddunbar
(Daniel Dunbar)
3
This is super cool, the APIs in the blog post are
.
I think @tomerd's bio has a couple typos.
Tom Doron is a member of the Swift Core Team and the Swift Server Work Group . He manages a team working on server-side Swift libraries at Apple.
This is really awesome news, especially for iOS developers that don't want to deal with server deployment and maintenance!!!
Also, is this code sample supposed to say "decoding" instead of "encoding"?
// Response, uses Codable for transparent JSON encoding
private struct Response: Codable {
let message: String
}
And is it necessary for the types to conform to Codable rather than the more specific protocols?
Sorry, that was the corrected version.
1 Like
is this code sample supposed to say "decoding" instead of "encoding"?
the response in this case is on the server side, so being encoded into JSON bytes that will sent to the client
is it necessary for the types to conform to Codable rather than the more specific protocols?
Encodable and Decodable are sufficient: https://github.com/swift-server/swift-aws-lambda-runtime/blob/master/Sources/AWSLambdaRuntime/Lambda%2BCodable.swift#L24
GalCohen
(Gal Cohen)
11
Awesome job! This is really exciting.
Sajjon
(Alexander Cyon)
12
This sounds great! I am a complete n00b at Backend dev and I only know the ultra basics of AWS Lambdas.
Maybe we could add just a section to the blog, explaining in one or two sentences what this would mean for me as an iOS app developer? That would be very helpful IMO. Would something like the following statement be correct? - “thanks to this new project you can easily yourself write a Backend yourself for your iOS/macOS apps“. This would have help promting this great project to Backend ignorant fools like me :)
2 Likes
kiel
(Kiel Gillard)
14
Can anyone recommend a good tutorial for clueless idiots like myself?
1 Like
Hi, I adapted a demo example previously made with my framework Swift-Sprinter to work with the new runtime.
The demo deploys a Serverless REST API using swift-aws-lambda-runtime and aws-sdk-swift.
@Sajjon @kiel Try out this.
@tomerd if you like it I can contribute to adapt it and put it in the official repository.
7 Likes
Dheeraj
(Dheeraj Chahar)
17
Hey can you provide a blog where for first time learners, where we can follow the steps to achieve building our own lambda functions in AWS.
2 Likes
Hi @Dheeraj, @Sajjon and everyone interested,
I've just published a getting started guide on my website, that hopefully addresses most of your questions.
Let me know if I missed anything...
6 Likes
cmlccie
(Chris Lunsford)
20
This is excellent and it might save me from having to split backend implementations (previously using Go, JavaScript, Python, and etc.)!!
I know there is a community-driven AWS Swift SDK. Are there any efforts, related to this AWS Lambda Runtime project, to create an official AWS Swift SDK?
Most of the Lambda functions I write utilize multiple AWS services. This Lambda support is a huge step forward. Getting an official SDK (and having that SDK baked in to the Swift Lambda environment) will really round-out this into a operationally successful tool in many developer’s tool belts. 
t089
(Tobias)
21
1 Like