Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Shared ADF Lambda Layer builds and add move to ARM-64 Lambdas #680

Merged
merged 1 commit into from
Jan 18, 2024

Commits on Jan 18, 2024

  1. Fix Shared ADF Lambda Layer builds and add move to ARM-64 Lambdas

    **Why?**
    
    The Lambda Layer that ADF builds included the `bootstrap/adf-build/shared`
    folder as its source.
    
    Unfortunately, this resulted in 388 MB of unzipped dependencies.
    While the maximum limit for AWS Lambda Layers is set at 250 MB.
    
    **What?**
    
    After going through each of the lambda functions that use this Lambda Layer,
    I realized that they only require the files located in
    `bootstrap/adf-build/shared/python`.
    
    Since this implied no longer requiring AWS CDK in the Lambda Layer, I also
    used this opportunity to move to the ARM-64 Lambdas in ADF.
    
    The new Lambda Layer is 26 MB.
    
    To build ARM-64 on CodeBuild, I've added the Amazon managed container that
    enables cross-architecture builds on Docker. That will launch and
    configure Qemu correctly, so ARM-64 Docker images can execute correctly.
    I've also fixed the build metadata and updated the `sam build` process to
    use a container instead. As without it, it could not resolve the dependencies
    required for PyYaml and others specifically for ARM-64.
    
    Lastly, I've updated the shared lambda layer permissions, so we have
    control in the stack who can access and build on top of it.
    sbkok committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    1f0bd78 View commit details
    Browse the repository at this point in the history