kneekey23 / AmplifyDaysLambda

Demo of how to stand up a project to build a lambda for the Swift Lambda Runtime.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AmplifyDaysLambda

This package is a demo of setting up a Swift Lambda to use the Swift Lambda Runtime. Commands to deploy this Lambda to your own account are:

  1. Set up the docker image by running
docker build -t swift-lambda .
  1. Build the swift package inside the docker container by running it
docker run \
     --rm \
     --volume "$(pwd)/:/src" \
     --workdir "/src/" \
     swift-lambda \
     swift build --product AmplifyDaysLambda -c release
  1. Package the Lambda inside the docker container by running it again and calling the script this time
docker run \
     --rm \
     --volume "$(pwd)/:/src" \
     --workdir "/src/" \
     swift-lambda \
     scripts/package.sh AmplifyDaysLambda
  1. Create a lambda with a custom runtime of "Provide your own bootstrap" and upload the zip that was created in step 3 which is located at pathToThisRepo/.build/lambda/AmplifyDaysLambda/lambda.zip

More info here. Full Demo is here

About

Demo of how to stand up a project to build a lambda for the Swift Lambda Runtime.


Languages

Language:Swift 88.3%Language:Shell 8.9%Language:Dockerfile 2.9%