All Projects β†’ aws β†’ Aws Extensions For Dotnet Cli

aws / Aws Extensions For Dotnet Cli

Licence: apache-2.0
Extensions to the dotnet CLI to simplify the process of building and publishing .NET Core applications to AWS services

Projects that are alternatives of or similar to Aws Extensions For Dotnet Cli

Curso Aws Com Terraform
🎦 πŸ‡§πŸ‡· Arquivos do curso "DevOps: AWS com Terraform Automatizando sua infraestrutura" publicado na Udemy. VocΓͺ pode me ajudar comprando o curso utilizando o link abaixo.
Stars: ✭ 62 (-74.38%)
Mutual labels:  aws-lambda, aws-ecs
Sqs Lambda Bridge
Ξ» πŸŒ‰The missing bridge from SQS to Lambda πŸŽ†
Stars: ✭ 36 (-85.12%)
Mutual labels:  aws-lambda, aws-ecs
Aws Elasticache Retail Dashboard
AWS ElastiCache for Redis driven real-time retail dashboard
Stars: ✭ 24 (-90.08%)
Mutual labels:  aws-lambda, aws-ecs
Serverlessish
Run the same Docker images in AWS Lambda and AWS ECS
Stars: ✭ 177 (-26.86%)
Mutual labels:  aws-lambda, aws-ecs
Aws Lambda Cheatsheet
AWS Lambda cheatsheet.
Stars: ✭ 227 (-6.2%)
Mutual labels:  aws-lambda
Chrome Aws Lambda Layer
43 MB Google Chrome to fit inside AWS Lambda Layer compressed with Brotli
Stars: ✭ 212 (-12.4%)
Mutual labels:  aws-lambda
Retinal
πŸ™ Retinal is a Serverless AWS Lambda service for resizing images on-demand or event-triggered
Stars: ✭ 208 (-14.05%)
Mutual labels:  aws-lambda
Terraform Aws Ecs
Terraform module which creates AWS ECS resources
Stars: ✭ 203 (-16.12%)
Mutual labels:  aws-ecs
Serverless Prune Plugin
Serverless plugin to reap unused versions of deployed functions from AWS
Stars: ✭ 243 (+0.41%)
Mutual labels:  aws-lambda
Formplug Serverless
Form forwarding service for AWS Lambda
Stars: ✭ 232 (-4.13%)
Mutual labels:  aws-lambda
Aws Lambda Haskell Runtime
⚑Haskell runtime for AWS Lambda
Stars: ✭ 223 (-7.85%)
Mutual labels:  aws-lambda
Hal
hal provides an AWS Lambda Custom Runtime environment for your Haskell applications.
Stars: ✭ 213 (-11.98%)
Mutual labels:  aws-lambda
Serverless Chrome
🌐 Run headless Chrome/Chromium on AWS Lambda
Stars: ✭ 2,625 (+984.71%)
Mutual labels:  aws-lambda
Yoyo
A dead simple comment engine built on top of AWS lambda and React, alternative comment service to Disqus.
Stars: ✭ 210 (-13.22%)
Mutual labels:  aws-lambda
Lambda Tester
Helper for unit testing AWS Lambda functions
Stars: ✭ 233 (-3.72%)
Mutual labels:  aws-lambda
Serverless Haskell
Deploying Haskell applications to AWS Lambda with Serverless
Stars: ✭ 204 (-15.7%)
Mutual labels:  aws-lambda
Ffmpeg Aws Lambda Layer
FFmpeg/FFprobe AWS Lambda layer
Stars: ✭ 222 (-8.26%)
Mutual labels:  aws-lambda
Aws Lambda Typescript
This sample uses the Serverless Application Framework to implement an AWS Lambda function in TypeScript, deploy it via CloudFormation, publish it through API Gateway to a custom domain registered on Route53, and document it with Swagger.
Stars: ✭ 228 (-5.79%)
Mutual labels:  aws-lambda
Pychromeless
Python Lambda Chrome Automation (naming pending)
Stars: ✭ 219 (-9.5%)
Mutual labels:  aws-lambda
Apilogs
Easy logging and debugging for Amazon API Gateway and AWS Lambda Serverless APIs
Stars: ✭ 216 (-10.74%)
Mutual labels:  aws-lambda

AWS Extensions for .NET CLI

This repository contains AWS tool extensions to the .NET CLI. These tool extensions are focused on building .NET Core and ASP.NET Core applications and deploying them to AWS services. Many of these deployment commands are the same commands the AWS Toolkit for Visual Studio uses to perform its deployment features. This allows you to do initial deployment in Visual Studio and then easily transition from Visual Studio to the command line and automate the deployment.

For example with the AWS Lambda .NET CLI tool extension configured you can deploy a Lambda function from the command line in the Lambda function's project root directory.

dotnet lambda deploy-function MyFunction

The extension will prompt you for missing required parameters. To disable the extension from prompting, set the command line switch --disable-interactive to true.

For a history of releases view the release change log

Installing Extensions

As of September 10th, 2018 these extensions have migrated to be .NET Core Global Tools. As part of the migration each of these tools version number was set to 3.0.0.0

To install these tools use the dotnet tool install command.

dotnet tool install -g Amazon.Lambda.Tools

To update to the latest version of one of these tools use the dotnet tool update command.

dotnet tool update -g Amazon.Lambda.Tools

Migrating from DotNetCliToolReference

To migrate an existing project away from the older project tool, you need to edit your project file and remove the DotNetCliToolReference for the tool package. For example, let's look at an existing Lambda project file.

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.1</TargetFramework>
    <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>

    <-- The new property indicating to AWS Toolkit for Visual Studio this is a Lambda project -->
    <AWSProjectType>Lambda</AWSProjectType>
  </PropertyGroup>
  
  <ItemGroup>
    <-- This line needs to be removed -->
    <DotNetCliToolReference Include="Amazon.Lambda.Tools" Version="2.2.0" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Amazon.Lambda.Core" Version="1.0.0" />
    <PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.3.0" />
  </ItemGroup>
</Project>

To migrate this project, you need to delete the DotNetCliToolReference element, including Amazon.Lambda.Tools. If you don't remove this line, the older project tool version of Amazon.Lambda.Tools will be used instead of an installed Global Tool.

The AWS Toolkit for Visual Studio before .NET Core 2.1 would look for the presence of Amazon.Lambda.Tools in the project file to determine whether to show the Lambda deployment menu item. Because we knew we were going to switch to Global Tools, and the reference to Amazon.Lambda.Tools in the project was going away, we added the AWSProjectType property to the project file. The current version of the AWS Toolkit for Visual Studio now looks for either the presence of Amazon.Lambda.Tools or the AWSProjectType set to Lambda. Make sure when removing the DotNetCliToolReference that your project file has the AWSProjectType property to continue deploying with the AWS Toolkit for Visual Studio.

Supported AWS Services

The following AWS services each have their own .NET CLI tool extension to make it easy to deploy a .NET Core Application to them.

Defaults File

Each tool extension supports a defaults JSON file that is used to preset values for all of the command line switches. When a command is executed it will look for values for the command line switches in this file if they are not specified on the command line. The file is a JSON document where each property name matches the full command line switch excluding the -- prefix.

To avoid confusing missing properties from different tool extensions, each tool extension looks for a different named file in the root of the project.

Tool Extension Defaults File Name
Amazon.ECS.Tools aws-ecs-tools-defaults.json
Amazon.ElasticBeanstalk.Tools aws-beanstalk-tools-defaults.json
Amazon.Lambda.Tools aws-lambda-tools-defaults.json

When deploying with the AWS Toolkit for Visual Studio, you can choose to have the deployment wizard save chosen values into the defaults file. This makes it easy to switch to the command line.

For example, the following aws-ecs-tools-defaults.json has values for the AWS region, AWS credential profile and build configuration. If you use it with an ECS command, you will not need to enter those values.

{
    "region": "us-west-2",
    "profile": "default",
    "configuration": "Release"
}

Use the --config-file switch to use an alternative file. Set the --persist-config-file switch is set to true to persist all of its settings in the defaults file.

Amazon Elastic Container Service (Amazon.ECS.Tools)


This tool extension takes care of building a Docker image from a .NET application and then deploying the Docker image to Amazon Elastic Container Service (ECS). The application must contain a dockerfile instructing this tool and the Docker CLI which this tool uses to build the Docker image.

You must install Docker before using this extension to deploy your application.

Install

To install the extension run the following command.

dotnet tool install -g Amazon.ECS.Tools

Available Commands

Deploy Service
dotnet ecs deploy-service ...

Deploys the .NET Core application as service on an ECS cluster. Services are for long lived process like web applications. Services have a desired number of tasks that will run the application. If a task instance dies for whatever reason the service will spawn a new task instance. Services can also be associated with an Elastic Load Balancer so that each of the tasks in the services will be registered as targets for the load balancer.

Deploy Task
dotnet ecs deploy-task

Deploys the .NET Core application as task on an ECS Cluster. This is good for batch processing and similar jobs where once the process identified in the dockerfile exits the ECS task should end.

Deploy Scheduled Task
dotnet ecs deploy-scheduled-task

Creates a new ECS task definition and then configures a Amazon CloudWatch Event rule to run a task using the new task definition and a scheduled interval.

Push Image
dotnet ecs push-image

Builds the Docker image from the .NET Core application and pushes it to Amazon Elastic Container Registery (ECR). The other ECS deployment tasks first run this command before continuing on with deployment.

AWS Elastic Beanstalk (Amazon.ElasticBeanstalk.Tools)


This tool extension deploys ASP.NET Core applications to AWS Elastic Beanstalk environment.

Install

To install the extension run the following command.

dotnet tool install -g Amazon.ElasticBeanstalk.Tools

Available Commands

Deploy Environment
dotnet eb deploy-environment

Deploys the ASP.NET Core application to a Elastic Beanstalk environment after building and packaging up the application. If the Elastic Beanstalk environment does not exist then the command will create the environment.

Delete Environment
dotnet eb delete-environment

Deletes an environment.

List Environments
dotnet eb list-environments

Lists all of the current running environments along with the URL to access the environment.

AWS Lambda (Amazon.Lambda.Tools)


This tool extension deploys AWS Lambda .NET Core functions.

Install

To install the extension run the following command.

dotnet tool install -g Amazon.Lambda.Tools

Available Commands

Deploy Function
dotnet lambda deploy-function

Deploys the .NET Core Lambda project directly to the AWS Lambda service. The function is created if this is the first deployment. If the Lambda function already exists then the function code is updated. If any of the function configuration properties specified on the command line are different, the existing function configuration is updated. To avoid accidental function configuration changes during a redeployment, only default values explicitly set on the command line are used. The defaults file is not used.

Invoke Function
dotnet lambda invoke-function MyFunction --payload "The Function Payload"

Invokes the Lambda function in AWS Lambda passing in the value of --payload as the input parameter to the Lambda function.

List Functions
dotnet lambda list-functions

List all of the currently deployed Lambda functions.

Delete Function
dotnet lambda delete-function

Delete a Lambda function

Get Function Configuration
dotnet lambda get-function-config

Get the Lambda function's configuration like memory limit and timeout.

Update Function Configuration
dotnet lambda update-function-config

Update the Lambda function's configuration without uploading new code.

Deploy Serverless
dotnet lambda deploy-serverless

Deploys one or more Lambda functions from the Lambda project through CloudFormation. The project uses the serverless.template CloudFormation template to deploy the serverless app along with any additional AWS resources defined in the serverless.template.

CloudFormation stacks created with this command are tagged with the AWSServerlessAppNETCore tag.

List Serverless
dotnet lambda list-serverless

Lists the .NET Core Serverless applications which are identified by looking for the AWSServerlessAppNETCore tag on existing CloudFormation Stacks.

Delete Serverless
dotnet lambda delete-serverless

Deletes the serverless application by deleting the CloudFormation stack.

Package CI
dotnet lambda package-ci

Used for serverless applications. It creates the Lambda application bundle and uploads it to Amazon S3. It then writes a new version of the serverless.template with the location of the Lambda function code updated to where the application bundle was uploaded. In an AWS CodePipeline this command can be executed as part of a CodeBuild stage returning the transformed template as the build artifact. Later in the pipeline that transformed serverless.template can be used with a CloudFormation stage to deploy the application.

Package
dotnet lambda package

Creates the Lambda application bundle that can later be deployed to Lambda.

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].