<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Stanko Petkovic on Medium]]></title>
        <description><![CDATA[Stories by Stanko Petkovic on Medium]]></description>
        <link>https://medium.com/@stanko.s.petkovic?source=rss-82d69e70c048------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FgxHVZ0CleyEPpv_uxSsrA.jpeg</url>
            <title>Stories by Stanko Petkovic on Medium</title>
            <link>https://medium.com/@stanko.s.petkovic?source=rss-82d69e70c048------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 13:48:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@stanko.s.petkovic/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Controlling AWS Lambda network activities]]></title>
            <link>https://medium.com/@stanko.s.petkovic/controlling-aws-lambda-network-activities-83d00bf95cf0?source=rss-82d69e70c048------2</link>
            <guid isPermaLink="false">https://medium.com/p/83d00bf95cf0</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Stanko Petkovic]]></dc:creator>
            <pubDate>Sat, 28 Dec 2024 15:15:25 GMT</pubDate>
            <atom:updated>2024-12-28T15:15:25.130Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Network Security of your Lambda Code" src="https://cdn-images-1.medium.com/max/640/1*x8qjTssQoriWDgeg966iyQ.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/madartzgraphics-3575871/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1944688">Darwin Laganzon</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1944688">Pixabay</a></figcaption></figure><p>A few days ago I was confronted with the following question: “A bad actor succeed to inject a piece of malicious code in a library that you are using, and it is sending data about your workload to his server. How do you observe in real-time such an activity and how do you make a preventive action to block it?”</p><p>Of course, there must be a way — we are talking about AWS here — security is priority number one. There must be a solution I am not aware of. But …</p><p>If you need to control lambda traffic, there is standard solution: You need to deploy lambda in one of your VPCs in a<strong> private subnet</strong>(deploying it in public subnet is not going to work), and if you need traffic to the internet you need to have NAT Gateways:</p><figure><img alt="How to secure AWS Lambda Networking" src="https://cdn-images-1.medium.com/max/851/1*oS8HlgQTIfXN-QbY6W4-ew.png" /><figcaption>AWS Lambda Network Protection</figcaption></figure><p>Now you have a whole suite of standard AWS Tools to control and monitor you networking: NACLs and Security Groups, Network firewalls, Guard Duty …</p><p>That is a standard solution, but it defeats the “only business logic — only functionality” mindset of a fully managed lambda service: I need to deploy NAT-Gateways, I am no-longer to pay only for lambdas according to how much they are being used, but I need to pay at least two NAT-Gateways constantly etc. … My infrastructure is more than just my lambda code.</p><p>Somehow I get used to reason about lambdas as only as “care about your business logic, and all the rest is managed — even the networking”. And all is highly secure.</p><p>However, when you start allowing 3rd party code to run on “<em>your lambda</em>”, you must not forget that <strong>you are still responsible</strong> of<strong> the security in the cloud</strong> and if your system requires higher level of auditability and security, “<em>simple lambda</em>” is no longer an option. Sorry …</p><p>Until now I did not manage to find another solution. It would be really good, dear AWS if you happen to read this, if you would create something as Security Groups to be imposed on Lambdas that are run “outside my VPC”. Tnx!</p><blockquote>TLDR; I could only find references the standard more complex way, to deploy lambda in a VPC. Then you can do all preventive and detective security activities in a standard way. However the benefit of “lambda as a fully manged service” seams to be degraded to me. If only AWS would introduced “SGs for Lambdas”.</blockquote><p>A further read:</p><ul><li><a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html#vpc-internet">Giving Lambda functions access to resources in an Amazon VPC</a></li><li><a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc-internet.html">Enable internet access for VPC-connected Lambda functions</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83d00bf95cf0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>