All Projects → anmonteiro → Aws Lambda Ocaml Runtime

anmonteiro / Aws Lambda Ocaml Runtime

Licence: bsd-3-clause
An OCaml custom runtime for AWS Lambda

Programming Languages

ocaml
1615 projects

Projects that are alternatives of or similar to Aws Lambda Ocaml Runtime

Portkey
Live-coding the Cloud
Stars: ✭ 139 (-14.72%)
Mutual labels:  serverless, aws-lambda
Selfie2anime
Anime2Selfie Backend Services - Lambda, Queue, API Gateway and traffic processing
Stars: ✭ 146 (-10.43%)
Mutual labels:  serverless, aws-lambda
Serverless Pg
A package for managing PostgreSQL connections at SERVERLESS scale
Stars: ✭ 142 (-12.88%)
Mutual labels:  serverless, aws-lambda
Spark On Lambda
Apache Spark on AWS Lambda
Stars: ✭ 137 (-15.95%)
Mutual labels:  serverless, aws-lambda
List Lambdas
Enumerate Lambda functions across all regions with useful metadata 💡💵⚙
Stars: ✭ 156 (-4.29%)
Mutual labels:  serverless, aws-lambda
Shadowreader
Serverless load testing for replaying website traffic. Powered by AWS Lambda.
Stars: ✭ 138 (-15.34%)
Mutual labels:  serverless, aws-lambda
Aws Lambda Libreoffice
85 MB LibreOffice to fit inside AWS Lambda compressed with Brotli
Stars: ✭ 145 (-11.04%)
Mutual labels:  serverless, aws-lambda
A Crash Course On Serverless Auth
A short and easy boilerplate showcasing JWT auth with Nodejs, the Serverless framework, MongoDB and AWS Lambda.
Stars: ✭ 127 (-22.09%)
Mutual labels:  serverless, aws-lambda
Zappa
Serverless Python
Stars: ✭ 11,859 (+7175.46%)
Mutual labels:  serverless, aws-lambda
Zappa Django Guide
A full featured walkthough of using django on zappa (powered by AWS Lambda in serverless environment)
Stars: ✭ 161 (-1.23%)
Mutual labels:  serverless, aws-lambda
Cra Serverless
Serverless pre-rendering (SSR) for React SPA using AWS Lambda, S3, and CloudFront.
Stars: ✭ 137 (-15.95%)
Mutual labels:  serverless, aws-lambda
Serverless Next.js
⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
Stars: ✭ 2,977 (+1726.38%)
Mutual labels:  serverless, aws-lambda
Aws Lambda Scala
Writing AWS Lambdas in Scala
Stars: ✭ 135 (-17.18%)
Mutual labels:  serverless, aws-lambda
Flogo
Project Flogo is an open source ecosystem of opinionated event-driven capabilities to simplify building efficient & modern serverless functions, microservices & edge apps.
Stars: ✭ 1,891 (+1060.12%)
Mutual labels:  serverless, aws-lambda
Aws Lambda List
A list of hopefully useful AWS lambdas and lambda-related resources.
Stars: ✭ 130 (-20.25%)
Mutual labels:  serverless, aws-lambda
Serverless Sam
Serverless framework plugin to export AWS SAM templates for a service
Stars: ✭ 143 (-12.27%)
Mutual labels:  serverless, aws-lambda
Fx
A Function as a Service tool makes a function as a container-based service in seconds.
Stars: ✭ 1,679 (+930.06%)
Mutual labels:  serverless, aws-lambda
Landsat Tiler
A serverless Landsat tiles server using AWS Lambda
Stars: ✭ 126 (-22.7%)
Mutual labels:  serverless, aws-lambda
Serverless Sentry Plugin
This plugin adds automatic forwarding of errors and exceptions to Sentry (https://sentry.io) and Serverless (https://serverless.com)
Stars: ✭ 146 (-10.43%)
Mutual labels:  serverless, aws-lambda
Archive aws Lambda Go Net
Network I/O interface for AWS Lambda Go runtime.
Stars: ✭ 151 (-7.36%)
Mutual labels:  serverless, aws-lambda

OCaml Runtime for AWS Lambda

This package provides a custom runtime for AWS Lambda.

Example function

See the examples folder.

Deploying

Note: Based on the instructions in this blog post and the Rust custom runtime repository

For a custom runtime, AWS Lambda looks for an executable called bootstrap in the deployment package zip. Rename the generated basic executable to bootstrap and add it to a zip archive.

The Dockerfile (in conjunction with the build.sh script) in this repo does just that. It builds a static binary called bootstrap and drops it in the target directory.

$ ./build.sh && zip -j ocaml.zip bootstrap

Now that we have a deployment package (ocaml.zip), we can use the AWS CLI to create a new Lambda function. Make sure to replace the execution role with an existing role in your account!

$ aws lambda create-function --function-name OCamlTest \
  --handler doesnt.matter \
  --zip-file file://./ocaml.zip \
  --runtime provided \
  --role arn:aws:iam::XXXXXXXXXXXXX:role/your_lambda_execution_role \
  --tracing-config Mode=Active

You can now test the function using the AWS CLI or the AWS Lambda console

$ aws lambda invoke --function-name OCamlTest \
  --payload '{"firstName": "world"}' \
  output.json
$ cat output.json  # Prints: {"message":"Hello, world!"}

Copyright & License

Copyright © 2018 António Nuno Monteiro

Distributed under the 3-clause BSD License (see LICENSE).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].