Can't find an example of how to create a dockerfile using the dotnet Lambda Runtime Interface Client
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 503
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 18
Description
### Describe the issue
The page [Deploy .NET Lambda functions with container images](https://docs.aws.amazon.com/lambda/latest/dg/csharp-image.html) provides a [link](https://github.com/aws/aws-lambda-dotnet/blob/master/README.md) to "downloading" the Runtime Interface Client for dotnet, but there are no instructions on how to construct a custom Dockerfile with the client nor is there anything to "download" that I can see.
How can I write a Dockerfile with a custom base and in a straightforward way install or "download" the runtime interface client? The only documentation I have found is about [using the Amazon.Lambda.RuntimeSupport as class library](https://github.com/aws/aws-lambda-dotnet/tree/master/Libraries/src/Amazon.Lambda.RuntimeSupport) which does not seem like something I want to do if I can avoid it, and also it's not clear how that is meant to be used alongside my actual function code (examples don't feel complete).
Btw, I'm trying to write a Dockerfile that like the official `public.ecr.aws/lambda/dotnet:6` allows for specifying executable assembles as the Lambda Handler.
I tried hacking together something like this:
```Dockerfile
FROM mcr.microsoft.com/playwright/dotnet:v1.21.0-focal
ENV LAMBDA_TASK_ROOT=/var/task
COPY --from=public.ecr.aws/lambda/dotnet:6 /var/runtime /var/runtime
COPY --from=build /app/publish/* /var/task
RUN mkdir -p /var/lang/bin
RUN ln -s /usr/bin/dotnet /var/lang/bin/dotnet
ENTRYPOINT [ "/var/runtime/Amazon.Lambda.RuntimeSupport" ]
WORKDIR /var/task
CMD ["HttpApi"] # HttpApi is a .NET 6 Minimal API (Executable Assembly)
```
but that results in the following error:
```bash
2022-04-17T23:11:46.773Z fail Amazon.Lambda.RuntimeSupport.ExceptionHandling.LambdaValidationException: Invalid lambda function handler: '/bin/bash'. The valid format is 'ASSEMBLY::TYPE::METHOD'.
```
Ideally this should all feel as straightforward as it does for python:
The [Deploy Python Lambda functions with container images](https://docs.aws.amazon.com/lambda/latest/dg/python-image.html) has the section:

Which provides a direct link to to a [README](https://github.com/aws/aws-lambda-python-runtime-interface-client/blob/main/README.md) such as the one in this dotnet repo, and they have a [Usage](https://github.com/aws/aws-lambda-python-runtime-interface-client/blob/main/README.md#usage) section with clear instructions of how to construct a Dockerfile:

### Links
https://docs.aws.amazon.com/lambda/latest/dg/csharp-image.html
https://github.com/aws/aws-lambda-dotnet/blob/master/README.md
Contributor guide
Assessment
This issue has not been assessed yet.