Giter Site home page Giter Site logo

aws-lambda-fsharp-lab's Introduction

AWS Lambda F# Lab

Trying out F# on AWS Lambda.

Status

The build is not working correctly when compiling from Mono to .NET Core (both with build.fsx and build.sh).

The Dockerfilealso tries building an F# application with Microsoft's own dotnet in the Docker image. It is commented out, however, as the FSC compile step fails.

Manually installing the latest dotnet binaries with the F# generator and compiler does not resolve the issue (it cannot currently compile its own generated F# template projects).

The conclusion for now is to wait for a new version of the .NET Core SDK and tool-chain for Debian.

Developing with Mono on Mac

Assuming that you already have Mono installed, you need to install the Paket package manager and use it to download the dependencies.

mono .paket/paket.bootstrapper.exe
mono .paket/paket.exe install

After this, you can build the Lambda deployment package using the build.fsx script.

mono packages/FAKE/tools/Fake.exe build.fsx

Deploying the Lambda function

You can use the aws command like client like so to create the function:

aws lambda create-function \
  --function-name foo\
  --runtime dotnetcore1.0\
  --role lambda_basic_execution \
  --handler "HelloWorld::HelloWorld::handler" --zip-file "fileb://build/LambdaFunction.zip"

Use the deploy.sh script to update the function. You must set the AWS_PROFILE environment variable to the name of the AWS profile to use for deploying. (The profiles are defined in your ~/.aws/config configuration). For example if you have a profile named mjul-lambda-dev:

AWS_PROFILE=mjul-lambda-dev ./deploy.sh

aws-lambda-fsharp-lab's People

Contributors

mjul avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.