# AWS Lambda functions and the Linux Static SDK - works!

**URL:** <https://forums.swift.org/t/aws-lambda-functions-and-the-linux-static-sdk-works/72604>\
**Category:** Server\
**Tags:** linux, lambda\
**Created:** [June 19, 2024, 5:48pm UTC](https://forums.swift.org/t/aws-lambda-functions-and-the-linux-static-sdk-works/72604 "2024-06-19T17:48:59Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![t089](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/t089/32/40449_2.png) [@t089](https://forums.swift.org/u/t089)\
**Post date:** [June 20, 2024, 1:01pm UTC](https://forums.swift.org/t/aws-lambda-functions-and-the-linux-static-sdk-works/72604/22 "2024-06-20T13:01:13Z")

</div>

They do work, there has been quite some discussion on this previously. Eg in the original announcement thread [here](https://forums.swift.org/t/static-linking-on-linux-in-swift-5-3-1/41989)

The crux of it is: you can build a `-static-executable` but only if it does not use anything from `libc` because `libc` really does not want to be statically linked.

So, if you want a fully static executable AND you need something from libc, you can now use `musl`.

`-static-stdlib` has worked since a long time and allows you to only statically link the swift runtime libraries, but still dynamically link `libc` (and a few others). This brings the downside that the binary will not be as portable (mostly only runs reliably on the same distro and only if the libraries are present).

---

_[View the full topic](https://forums.swift.org/t/aws-lambda-functions-and-the-linux-static-sdk-works/72604)._
