aws / aws/aws-cdk

(aws-lambda): Support for .NET Lambda functions with included bundling

Open
#23,236 4 comments 5 reactions 1 assignee Claimed by @kaizencc View on GitHub
@aws-cdk/aws-lambda effort/large feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

This is a proposal to support .NET Lambda functions like what already exists for NodeJS, Python & Go. This construct will include the Lambda function definition with predefined bundling support locally or using a Docker container.

### Use Case

As a .NET developer I would like to build serverless Lambda application with .NET and deploy this application using AWS CDK. It is painful to design a build process which first need to build/test and package one or more Lambda functions in my project and then use `lambda.Code.fromAsset(path.join(__dirname, 'out', 'package.zip'))` to point to those packages. This has been beautifully solved with the `aws-lambda-go`, `aws-lambda-nodejs` and `aws-lambda-python` constructs and I would like to have the same experience with .NET.

### Proposed Solution

This functionality can implemented in a separate package called `aws-lambda-dotnet`. The code will look like this;

```
import * as dotnet from 'aws-cdk-lib/aws-lambda-dotnet';
...
new dotnet.DotNetFunction(this, 'WebApiFunction', {
projectDir: 'src/Serverless.WebApi'
});
...
```

### Other Information

I have already got started with this in my [fork](https://github.com/vlesierse/aws-cdk/tree/feat/lambda-dotnet/packages/%40aws-cdk/aws-lambda-dotnet) and I'm happy to continue with implementing the integration tests, documentation, collecting design feedback and submit the PR.

### Acknowledgements

- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.53.0

### Environment details (OS name and version, etc.)

macOS Monterey v12.6

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.