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

Package update does not affect lambda layers in Windows 10 #13353

Closed
2 tasks done
wrlakshan opened this issue Oct 20, 2023 · 12 comments
Closed
2 tasks done

Package update does not affect lambda layers in Windows 10 #13353

wrlakshan opened this issue Oct 20, 2023 · 12 comments
Labels
duplicate If marked with duplicate, issue will be closed & original will be added for traceability lambda-layers issues related to Lambda Layers pending-response Issue is pending response from the issue author pending-triage Issue is pending triage

Comments

@wrlakshan
Copy link

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v16.16.0

Amplify CLI Version

12.7.0

What operating system are you using?

Windows

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

Describe the bug

when I change the package.json file dependencies in the lambda layer and push those changes the lambda layer does not update Even amplify does not recognize the layer is changed.Amplify

Expected behavior

lambda layer can be update in the windows

Reproduction steps

1.change the lambda layer dependecies.
2. push it

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@wrlakshan wrlakshan added the pending-triage Issue is pending triage label Oct 20, 2023
@josefaidt
Copy link
Contributor

Hey @wrlakshan 👋 thanks for raising this! Lambda layer changes can be tricky with changing state on amplify status, where unlike the other resource categories the version of the layer is increased when you checkout the environment. If you run amplify env checkout <current-env-name> it should increase the version and allow you to push the changes

@josefaidt josefaidt added functions Issues tied to the functions category pending-response Issue is pending response from the issue author lambda-layers issues related to Lambda Layers and removed functions Issues tied to the functions category labels Oct 23, 2023
@wrlakshan
Copy link
Author

wrlakshan commented Oct 24, 2023

Hey @josefaidt
👋 thanks for answering this!
I tried this solution but not working. In my case, I am currently working in a sandbox. In the sandbox, I update the dependencies in the lambda layer. When I push it the amplify doesn't recognize those dependency changes.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Oct 24, 2023
@josefaidt
Copy link
Contributor

Hey @wrlakshan thanks for clarifying! After updating a dependency in the layer can you run amplify env checkout <current-env-name> before attempting to push to see if that triggers an update?

@josefaidt josefaidt added the pending-response Issue is pending response from the issue author label Oct 24, 2023
@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Oct 26, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@wrlakshan
Copy link
Author

Hi @josefaidt

I attempted to execute the command amplify env checkout prior to the push operation. However, it didn’t seem to make any difference.

@wrlakshan wrlakshan reopened this Oct 26, 2023
@ykethan
Copy link
Member

ykethan commented Oct 26, 2023

Hey @wrlakshan, the issue appears to be similar to bug on #10371
Could you try making a empty change on the package.json(Ex: nodejs) in the layer then run amplify status. Do let us know if the layer does show a update status.
As a workaround, you can try running amplify push --force to push the project.

@ykethan ykethan added duplicate If marked with duplicate, issue will be closed & original will be added for traceability pending-response Issue is pending response from the issue author labels Oct 26, 2023
@wrlakshan
Copy link
Author

Hey @ykethan, I try this but it does not work.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Nov 8, 2023
@ykethan
Copy link
Member

ykethan commented Nov 8, 2023

Possible workaround:
modifying the parameters.json description attributes does seem to invoke a update status. But did notice this modified the description parameter from a reference to a value in the generated CloudFormation template.

from:

"Description": {
          "Ref": "description"
        },

to:

 "Description": "Updated layer version 2023-11-08T18:46:47.625Z",

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Nov 8, 2023
@MyNameIsTakenOMG
Copy link

MyNameIsTakenOMG commented Nov 30, 2023

I'm using the latest version of amplify CLI 12.8.2 , and my parameters.json looks like this:
Capture

and when I installed a new package and ran the command amplify status, however, still unable to detect the change 🤔
So instead, what I did was creating a new layer and deleting the previous one although it's not decent.

@josefaidt
Copy link
Contributor

Closing due to inactivity and in favor of tracking #10371

@josefaidt josefaidt closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
Copy link

github-actions bot commented Feb 2, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@awailly
Copy link

awailly commented Jun 22, 2024

Amplify is looking in package.json recursively for changes, and will consider the layer for an update if one of the package.json file was modified. I suggest to try adding text into the package.json description and see if amplify status displays the layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate If marked with duplicate, issue will be closed & original will be added for traceability lambda-layers issues related to Lambda Layers pending-response Issue is pending response from the issue author pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

5 participants