Member-only story
.NET AWS Lambda Function
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Related Stories: AWS Security | Lambda Security
💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I haven’t used .NET in a couple of years but a lot of pen testers are using it more now so thought I’d give it another look. Might come in handy. :) Also checking out how it works for my upcoming talk at RSA 2020 on Serverless Attack Vectors.
Install .NET SDK (CLI) on AWS EC2 Instance
The first thing I tried to do is to write it from scratch without .NET tools, but it was a pain. .NET generates a bunch of files required for a project that I forgot about. I got errors like this one.
{
"errorType": "LambdaException",
"errorMessage": "Could not find the required 'LambdaTest.deps.json'. This file should be present at the root of the deployment package."
}I didn’t want more tools on local machine so for a quick test I installed it on an AWS EC2 instance.
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpmsudo yum install dotnet-sdk-3.1
Simple AWS .NET Lambda Test
Once I got over my aversion to installing a bunch of different tools to do a simple thing, I followed an AWS tutorial but hit a couple of glitches so…









