JSPM

  • Created
  • Published
  • Downloads 27
  • Score
    100M100P100Q47716F
  • License MIT

Serverless framework plugin for Swift applications

Package Exports

  • serverless-swift

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-swift) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

serverless swift npm

A ⚡ Serverless framework ⚡ plugin for Swift applications

📦 Install

Install the plugin with npm

$ npm i -D serverless-swift

💡 This serverless plugin assumes you are building Swift lambdas targeting the AWS Lambda "provided" runtime.

Add the following to your serverless project's serverless.yml file

service: demo

provider:
  name: aws
  runtime: swift

plugins:
  - serverless-swift

functions:
  test:
    # handler value syntax is `{your-executable-binary}.{bin-name}`
    # or `{your-executable-binary}` for short when you are building a
    # default bin for a given package.
    handler: <your-executable-binary>

The build needs to generate a swift executable. The name of the executable will either be the Swift project parent folder name by default or specified in the Package.swift file. Remember to place that instead of above.

On every deploy a prebuilt AWS Lambda Layer is attached automatically to every swift functions. The layer adds required dependencies to run a compiled Swift executables in a Lambda.

🙌 Acknowledgements

This project has been possible thanks to the following people: