Skip to content

Files

Latest commit

04cb66e · Nov 8, 2019

History

History

aws-cs-lambda

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 8, 2019
Nov 8, 2019
Nov 7, 2019
Nov 8, 2019

AWS C# Lambda

This example creates a lambda that does a simple .toUpper on the string input and returns it.

Deploying the App

To deploy your infrastructure, follow the below steps.

Prerequisites

  1. Install Pulumi
  2. Configure AWS Credentials

Steps

After cloning this repo, from this working directory, run these commands:

  1. Build and publish the lambda function, making the output available to our Pulumi program.
dotnet publish ./DotnetLambda/src/DotnetLambda/
  1. Execute our Pulumi program to archive our published function output, and create our lambda.
pulumi up -C ./pulumi
  1. Call our lambda function from the aws cli.
aws lambda invoke \
--function-name $(pulumi stack output lambda -C ./pulumi) \
--region $(pulumi config get aws:region -C ./pulumi) \
--payload '"foo"' \
output.json

cat output.json # view the output file with your tool of choice
# "FOO"