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

Couldn't deploy custom Lambda Layer from yumda #4825

Closed
ErickWendel opened this issue Jul 14, 2020 · 4 comments
Closed

Couldn't deploy custom Lambda Layer from yumda #4825

ErickWendel opened this issue Jul 14, 2020 · 4 comments
Assignees
Labels
functions Issues tied to the functions category pending-triage Issue is pending triage

Comments

@ErickWendel
Copy link

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
Amplify Console GitHub Issue Tracker

Amplify CLI Version
4.24.0

Describe the bug
I'm trying to install custom layers using yumda. So I've installed the GraphicsMagick on /amplify/backend/function/gm/opt. When I deploy I see the "An error occurred hashing directory" error.

To Reproduce
Steps to reproduce the behavior:

  1. Install the GraphicsMagick package on /opt layer
docker run --rm \
    -v "$PWD"/amplify/backend/function/gm/opt:/lambda/opt \
    lambci/yumda:2 yum install -y GraphicsMagick
  1. Runamplify push
  2. See error:
An error occurred hashing directory /Users/erickwendel/Documents/pocs/amplify/meme-maker/app/amplify/backend/function/gm/opt
An error occurred during the push operation: An error occurred hashing directory /Users/erickwendel/Documents/pocs/amplify/meme-maker/app/amplify/backend/function/gm/opt

Expected behavior
Upload the custom package and inject on the runtime

What is Configured?

Environment

  System:
    OS: macOS 10.15.3
    CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
    Memory: 116.02 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.0.0 - /usr/local/bin/node
    npm: 6.14.6 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 81.1.9.76
    Chrome: 83.0.4103.116
    Safari: 13.0.5
  npmGlobalPackages:
    @aws-amplify/cli: 4.24.0
    autocannon: 4.6.0
    create-react-app: 3.4.1
    fkill-cli: 6.0.1
    npm: 6.14.6
    ntl: 5.0.0
    serverless: 1.67.0
    sloc: 0.2.1
@UnleashedMind UnleashedMind added functions Issues tied to the functions category pending-triage Issue is pending triage labels Jul 14, 2020
@jhockett
Copy link
Contributor

Hi @ErickWendel, is there a reason your /opt folder has a : at the end of it? The CLI seems to failing to find the /opt folder.

@jhockett jhockett added the pending-response Issue is pending response from the issue author label Jul 14, 2020
@ErickWendel
Copy link
Author

Hi @ErickWendel, is there a reason your /opt folder has a : at the end of it? The CLI seems to failing to find the /opt folder.

Hey @jhockett thanks for the response! Actually, using : is just a separator on Docker. The Docker volume is mapping from my local machine "$PWD"/amplify/backend/function/gm/opt to the container /opt. So the :

@jhockett jhockett removed the pending-response Issue is pending response from the issue author label Jul 15, 2020
@attilah
Copy link
Contributor

attilah commented Dec 10, 2020

Closing in favor of #6144

@attilah attilah closed this as completed Dec 10, 2020
@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
functions Issues tied to the functions category pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

4 participants