An open API service indexing awesome lists of open source software.

https://github.com/polpielladev/swift-compiler-lambda

🔨 An AWS Lambda that runs Swift code passed in as a string
https://github.com/polpielladev/swift-compiler-lambda

Last synced: 28 days ago
JSON representation

🔨 An AWS Lambda that runs Swift code passed in as a string

Awesome Lists containing this project

README

        

# CompilerLambda

This project builds and deploys a Lambda function that runs Swift code. This is similar to using the the Swift REPL locally, but opens up the possibility of running this in the cloud.

Since the code needs access to a Swift toolchain, a custom docker image is built and deployed to AWS ECR. The Lambda then can be configured to using the latest version of the deployed image.

## Build and deploy

```bash
docker build . -t compiler-lambda

docker tag compiler-lambda:latest .dkr.ecr..amazonaws.com/compiler-lambda:latest

docker push .dkr.ecr..amazonaws.com/compiler-lambda
```