• This repository has been archived on 26/Sep/2023
  • Stars
    star
    102
  • Rank 334,086 (Top 7 %)
  • Language
    C#
  • License
    Other
  • Created about 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Serverless .NET on AWS - 位# is a CLI and Framework for Rapid Application Development using .NET on AWS

位#

LambdaSharp - Serverless .NET on AWS

Read what's new in the v0.8.4 "Hicetas" release.

LambdaSharp is a CLI and framework for serverless .NET Core application development on AWS. LambdaSharp uses a simple declarative syntax to generate sophisticated CloudFormation templates that provide simple, yet flexible, deployment options.

The objective of LambdaSharp is to accelerate the development pace of serverless solutions while helping developers adhere consistently to best practices to create scalable, observable, and modular systems.

位# CLI

Install LambdaSharp CLI

The LambdaSharp CLI is installed as a .NET Global Tool.

dotnet tool install -g LambdaSharp.Tool

Once installed, a deployment tier must be initialized.

lash init --quick-start

Deploy a LambdaSharp Module

Creating modules with Lambda functions and deploying them only requires a few steps.

# Create a new LambdaSharp module
lash new module MySampleModule

# Add a function to the LambdaSharp module
lash new function MyFunction --type generic

# Deploy the LambdaSharp module
lash deploy

The LambdaSharp CLI uses a YAML file to compile the C# projects, upload artifacts, and deploy the CloudFormation stack in one step. The YAML file describes the entire module including the inputs, outputs, variables, resources, and functions.

Module: MySampleModule
Items:

 - Function: MyFunction
   Memory: 128
   Timeout: 30

The C# project contains the Lambda handler.

namespace MySampleModule.MyFunction {

    public class FunctionRequest {

        // add request fields
    }

    public class FunctionResponse {

        // add response fields
    }

    public sealed class Function : ALambdaFunction<FunctionRequest, FunctionResponse> {

        //--- Constructors ---
        public Function() : base(new LambdaSharp.Serialization.LambdaSystemTextJsonSerializer()) { }

        //--- Methods ---
        public override Task InitializeAsync(LambdaConfig config)
            => Task.CompletedTask;

        public override async Task<FunctionResponse> ProcessMessageAsync(FunctionRequest request) {

            // add business logic

            return new FunctionResponse();
        }
    }
}

Learn More

Getting Started

  1. Setup LambdaSharp

Articles

  1. Why LambdaSharp?
  2. Constructors/Destructors for CloudFormation

Samples

  1. Create a Serverless Chat with Cognito, WebSocket, DynamoDB, and Lambda
  2. Create a Static Website with CloudFormation
  3. Create Animated GIFs from Videos with AWS Lambda
  4. Misc. LambdaSharp Samples

References

  1. LambdaSharp CLI Reference
  2. LambdaSharp .NET SDK Reference
  3. LambdaSharp Syntax Reference
  4. LambdaSharp Module IAM Short-hands
  5. Modules
    1. LambdaSharp.Core
    2. LambdaSharp.S3.IO
    3. LambdaSharp.S3.Subscriber
    4. LambdaSharp.Twitter.Query
  6. Resource Types
    1. LambdaSharp::S3::EmptyBucket
    2. LambdaSharp::S3::Subscription
    3. LambdaSharp::S3::Unzip
    4. LambdaSharp::S3::WriteJson

License

Copyright (c) 2018-2022 LambdaSharp (位#)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

Chat

A chat application built with ASP.NET Core Blazor WebAssembly for the front-end, Amazon Cognito for user authentication, API Gateway WebSocket for communication, Amazon DynamoDB for storage using a single-table design, and AWS Lambda for the business logic written in C#. Finally, the application is delivered as as self-contained AWS CloudFormation template.
C#
22
star
2

LambdaSharp.Benchmark

Benchmark serverless .NET projects under various compilation options, deployment configurations, and architectures on AWS Lambda
C#
11
star
3

Cognito-UserPool-Challenge

This challenge is about using Cognito User Pools and setting up workflow triggers to change the user registration workflow.
C#
7
star
4

Alexa-AdventureBot-Challenge

AdventureBot is an Amazon Alexa Skill for creating your own voice-based adventures.
C#
6
star
5

LambdaSharp.DynamoDB

Use LINQ expressions with a type-safe, fluent interface to drastically simplify access to advanced DynamoDB features.
C#
5
star
6

AppSync-Challenge

In this challenge, we're going to learn about how to build relational APIs using GraphQL with AppSync.
JavaScript
5
star
7

ServerlessApi-Challenge

This challenge is about using the Serverless Framework to create a Serverless REST API using API Gateway and Lambda.
C#
4
star
8

Crawler-Challenge

In this challenge, we're going to learn how to write a scalable web crawler using AWS Lambda and AWS DynamoDB.
C#
4
star
9

ApiGateway-Challenge

In this challenge, we're going to learn how to setup an API Gateway, AWS Lambda function, and a AWS S3 data source to persist data from an existing RESTful application.
C#
4
star
10

LambdaSharp.Slack

This tutorial shows how to create an asynchronous Slack Command handler in C# using .Net Core.
C#
4
star
11

Bitcoin.HotOrNot

A Blazor WebAssembly app integrated with Amazon Amazon EventBridge, CloudWatch, and Lambda.
HTML
3
star
12

Step-Functions-Challenge

In this challenge we're going to explore AWS Step Functions while building an image analyzer that can identify and cut out faces (and also hot dogs) from images that are uploaded to S3.
C#
3
star
13

Automated-Image-Workflow-Challenge

Build an image analyzer that will rate an image using results from Amazon Rekognition features and post high ranking image to social media.
C#
3
star
14

GifMaker-Sample

Lambda function for creating animated GIFs from videos
C#
3
star
15

LambdaRobots

Port of the old school C/Pascal Robots game to AWS serverless .NET
C#
2
star
16

CloudWatch-Log-Parsing-Challenge

This challenge is all about creating 100% serverless log parser using CloudWatch Logs, Lambda, and Athena.
C#
2
star
17

StaticWebsite-Sample

Static website with pre-populated assets and a configurable title and message
CSS
2
star
18

SampleLambdaBlog

Sample serverless blog engine powered by C# Lambda functions
C#
1
star
19

TimeStone

C#
1
star
20

ElasticSearch-Indexing-Challenge

位# Indexing in the Cloud
C#
1
star
21

MachineLearning-SageMaker-Challenge

C#
1
star
22

AWS-IoT-Button-Challenge

In this challenge, we're going to learn how to write a serverless .NET Core backend for an IoT device.
C#
1
star
23

Bookmarks

C#
1
star
24

SumerianGoFish

Using Amazon Sumerian, Amazon Lex, AWS Lambda, and Amazon DynamoDB, we鈥檒l create a Sumerian scene as a visual interface for the game.
C#
1
star