Skip to content

Networking issue when using all libraries provided by ldd command #3

@nikola-mladenovic

Description

@nikola-mladenovic

When creating a Swift executable that is using networking, (e.g to communicate with other AWS components, or any other internet resource), the host name cannot be found.

After looking a bit deeper, it turns out the issue is with some of the libraries copied from Ubuntu container used to compile Swift executable (i.e libcurl.so.4 and its dependents).

After manually removing libcurl.so.4, the executable started using /usr/lib64/libcurl.so.4 provided by the AWS Lambda OS, the host names were successfully resolved.

Hopefully this information will be useful for anyone trying to perform any network related actions inside Swift executables running on Lambda, and perhaps open a discussion whether copying all libraries provided by the ldd is sufficient / good enough.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions