Skip to content

Commit

Permalink
Update to AWS Lambda template
Browse files Browse the repository at this point in the history
- the AWS Lambda template now uses Nybus.Extensions.Hosting.Lambda
  • Loading branch information
Kralizek committed Feb 28, 2019
1 parent 59e5d09 commit c856353
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 10 additions & 4 deletions content/AWSLambdaRabbitMQ/AWSLambdaRabbitMQ.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
Expand All @@ -7,14 +7,20 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Kralizek.Lambda.Template" Version="3.0.0" />
<PackageReference Include="Nybus.Extensions.Hosting.Lambda" Version="1.5.0" />

<PackageReference Include="Nybus" Version="1.4.0" />
<PackageReference Include="Nybus.Engine.RabbitMQ" Version="1.4.0" />
<PackageReference Include="Nybus" Version="1.5.0" />
<PackageReference Include="Nybus.Engine.RabbitMQ" Version="1.5.0" />

<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="2.1.1" />
</ItemGroup>

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
5 changes: 4 additions & 1 deletion content/AWSLambdaRabbitMQ/Function.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.IO;
using Amazon.Lambda.Core;
using Kralizek.Lambda;
using Microsoft.Extensions.Configuration;
Expand All @@ -10,10 +11,12 @@

namespace AWSLambdaRabbitMQ
{
public class Function : EventFunction<string>
public class Function : NybusFunction<string>
{
protected override void Configure(IConfigurationBuilder builder)
{
builder.SetBasePath(Directory.GetCurrentDirectory());

builder.AddJsonFile("appsettings.json", false);
builder.AddEnvironmentVariables();
}
Expand Down

0 comments on commit c856353

Please sign in to comment.