Skip to content

lib missing - /lib64/libc.so.6: version `GLIBC_2.18 - cfn submit zip missing library #180

Closed

Description

@JohnPreston

Submitted a new resource version using the latest versions of the CLI and LIB and when running in CFN I am getting
the following error.

Lambda function handler threw an uncaught exception: Unable to import module 'mongodb_atlas_awsiamdatabaseuser.handlers': /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /var/task/cryptography/hazmat/bindings/_rust.abi3.so)

.cfn_metata.json content (as uploaded by cfn submit)

{"plugin-tool-version": "2.1.5", "plugin-name": "python", "cli-version": "0.2.24"}

.rpdk-config content (as uploaded by cfn submit)

{
    "artifact_type": "RESOURCE",
    "typeName": "MongoDb::Atlas::AwsIamDatabaseUser",
    "language": "python37",
    "runtime": "python3.7",
    "entrypoint": "mongodb_atlas_awsiamdatabaseuser.handlers.resource",
    "testEntrypoint": "mongodb_atlas_awsiamdatabaseuser.handlers.test_entrypoint",
    "settings": {
        "version": false,
        "subparser_name": null,
        "verbose": 0,
        "force": false,
        "type_name": null,
        "artifact_type": null,
        "use_docker": false,
        "protocolVersion": "2.0.0"
    }
}

Only workaround found is to build the ResourceProvider.zip myself.

Activity

  1. changed the title [-]LIB 2. - cfn submit zip missing library[/-] [+]lib missing - /lib64/libc.so.6: version `GLIBC_2.18 - cfn submit zip missing library[/+] on Apr 3, 2022
  2. maslick commented on Jun 29, 2022

    @maslick

    Same thing with me. I was hoping to make cfn work with private Python repos (I have a dependency to my Cloudformation hook sitting in a private Python registry), but "use_docker": true doesn't allow that, so I set "use_docker": false, but that would lead to my Hook fail at runtime since it (the generated lambda function with dependencies) doesn't have proper libraries installed e.g. glibc etc.

    aws-cloudformation/cloudformation-cli#890

  3. maslick commented on Jul 1, 2022

    @maslick

    So the problem is that you're building your hook without docker, which means that cfn will use your host architecture to build certain dependencies (.so files, etc. ) and/or some dependencies will use some low-level libraries (e.g. glibc) in runtime. That means that while building your hook (cfn submit) you will need to mimic the Lambda execution environment. See my comment in aws-cloudformation/cloudformation-cli#890

  4. self-assigned this
    on Oct 13, 2022
  5. JohnPreston commented on Oct 19, 2022

    @JohnPreston
    ContributorAuthor

    So I figured out what was wrong for me but the thing is I re-implemented what cfn submit does via makefile, because that allowed me to make more gradual changes and run local tests. And also write my own CFN template to allow for StackSet based deployment.

    But to build the layer / resource zip file, I was using Docker for that and the source image I was using was a lean one. Using the ones from https://gallery.ecr.aws/lambda/python fixed that all and then I'd get all that was needed to work in the layer "build" folder.

    Apologies for not commenting on that earlier / when I figured a workaround that "worked for me" (again, mostly out of not using the cfn submit command.

  6. ericzbeard commented on Oct 19, 2022

    @ericzbeard

    Is any of that open source? Would love to see it!

  7. kddejong commented on Oct 19, 2022

    @kddejong
    Contributor

    We also switched to that image in this PR #193

  8. JohnPreston commented on Oct 19, 2022

    @JohnPreston
    ContributorAuthor

    Is any of that open source? Would love to see it!

    I rarely do close source. Also, hard to get trust for publicly available resources when it's closed up (haha)

    This one is most likely the latest and most up to date: https://github.com/compose-x/aws-cfn-confluentcloud-iam-serviceaccount

    It's GPL-2.0 because Confluent licenses things with licenses that betray their Apache 2.0 root, in case you were wondering.

  9. JohnPreston commented on Oct 19, 2022

    @JohnPreston
    ContributorAuthor

    Here is another I haven't given much love in a while, I should update the deps some time soon and align the Makefile.
    https://github.com/compose-x/aws-cfn-mongodb-atlas-awsiamdatabaseuser

  10. ericzbeard commented on Oct 19, 2022

    @ericzbeard

    Thanks for sharing! If you haven't seen it already, check out our Discord at https://discord.gg/9zpd7TTRwq, and the new community registry extensions repo at https://github.com/aws-cloudformation/community-registry-extensions.

  11. ericzbeard commented on Oct 19, 2022

    @ericzbeard

    Here is another I haven't given much love in a while, I should update the deps some time soon and align the Makefile. https://github.com/compose-x/aws-cfn-mongodb-atlas-awsiamdatabaseuser

    Looks like that one is private.

  12. JohnPreston commented on Oct 19, 2022

    @JohnPreston
    ContributorAuthor

    Here is another I haven't given much love in a while, I should update the deps some time soon and align the Makefile. https://github.com/compose-x/aws-cfn-mongodb-atlas-awsiamdatabaseuser

    Looks like that one is private.

    Fixed. I never did realize that. Thanks for pointing it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions