aws-amplify / aws-amplify/amplify-cli
RFC: Amplify CLI Swift Lambda runtime support
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 825
- Avg merge
- 11d 23h
- Merged PRs (30d)
- 2
Description
## Problem:
iOS developers don’t have a native development experience for functions today. While we serve Android customers (Java), Web customers (JS) and a variety of other customers (Python, Go, .Net Core), iOS developers have yet the ability to author functions in a language that they are most immediately familiar with.
## Proposed solution:
[AWS Lambda recently added support for the Swift runtime (5.2).](https://swift.org/blog/aws-lambda-runtime/) To enable a great experience for iOS developers, the Amplify CLI’s `add function` workflow will allow iOS developers to pick Swift as their preferred function runtime.
## Developer experience:
### `amplify add function`
```
❯ amplify-dev add function
? Provide a friendly name for your resource to be used as a label for this categ
ory in the project: layersdemo66def23d
? Provide the AWS Lambda function name: layersdemo66def23d
? Choose the runtime that you want to use: (Use arrow keys)
.NET Core 3.1
Go
Java
NodeJS
❯ Swift
Python
> Only one template found - using Hello World by default.
? Do you want to access other resources in this project from your Lambda function? (Y/n)
....
```
Customers can choose the “Swift” runtime during `amplify add function`. Amplify CLI will create a “Hello World” project for the customer and in its final step, open the .swift file let the customer edit the function.
### `amplify mock function `
Customer can mock Swift functions locally when the Swift runtime is available.
## Useful resources
* [Talk from Nicki Stone about Swift Lambda runtime](https://www.twitch.tv/videos/661560410?t=04h34m51s)
* [Swift Lambda runtime blog post](https://swift.org/blog/aws-lambda-runtime/)
* [Twitter Poll](https://twitter.com/Kilo_Loco/status/1278059298233311232)
Contributor guide
Research direction
Start by tracing the `amplify add function` and `amplify mock function ` workflows and reviewing the linked AWS Lambda Swift runtime resources. Define the Swift runtime selection, Hello World project creation, final .swift-file opening, and local mocking behavior; the work is done when both workflows support the proposed Swift experience.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, swift, typescript
- Domain
- cli, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100