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

I modified the function's cloudformation-template.json, but it still shows 'No Change' and does not apply the updates when I run amplify push. #14077

Open
2 tasks done
yhnamgung-grooo opened this issue Jan 22, 2025 · 3 comments
Labels
functions Issues tied to the functions category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage

Comments

@yhnamgung-grooo
Copy link

yhnamgung-grooo commented Jan 22, 2025

How did you install the Amplify CLI?

npm

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

20

Amplify CLI Version

9.2.1

What operating system are you using?

ubuntu

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

No manual changes have been made.
Everything is managed through cloudformation-template.

Describe the bug

I modified the cloudformation-template.json in the function. When you apply amplify push locally, all the modified functions will be updated. However, if you merge into the GitHub branch and apply amplify push in an action, only the function named ${projectName}AuthApi will be shown as updated, while the others will be marked as 'No Change'.

Expected behavior

${projectName}AuthApi
${projectName}CreateAuthChallenge
${projectName}DefineAuthChallenge
${projectName}PreSignup
${projectName}VerifyAuthChallengeResponse

I believe that all the modified functions should be detected as having an update status and should be deployed via amplify push.

Reproduction steps

step1.
Modify the cloudformation-template of the function related to auth.
The modification area modifies the Runtime of Lambda.

  • ${projectName}AuthApi
  • ${projectName}CreateAuthChallenge
  • ${projectName}DefineAuthChallenge
  • ${projectName}PreSignup
  • ${projectName}VerifyAuthChallengeResponse

step2.
amplify status in the local environment.
Verify that the function you changed is in the update state.

image : local terminal
Image

step3.
Push to github branch.
amplify push is performed within the github action.

npm i -g @aws-amplify/[email protected]
amplify init --amplify "{\"envName\":\"dev\"}" --yes
amplify push --yes

Only ${projectName}AuthApi is detected as a change.
image : github action
Image

Project Identifier

Project Identifier: 95f93be5a1103ea933af50416baa53e8

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.
@yhnamgung-grooo yhnamgung-grooo added the pending-triage Issue is pending triage label Jan 22, 2025
@yhnamgung-grooo yhnamgung-grooo changed the title I modified the function's cloudformation-template, but it still shows 'No Change' and does not apply the updates when I push. I modified the function's cloudformation-template.json, but it still shows 'No Change' and does not apply the updates when I run amplify push. Jan 22, 2025
@ykethan
Copy link
Member

ykethan commented Jan 22, 2025

Hey @yhnamgung-grooo, thank you for reaching out. Could you try upgrading your Amplify CLI to newer versions with the latest being 12.14.1. As on a quick test i was able to modify the runtime on a Lambda function with the status showing as Update on the latest version of Amplify CLI.

@ykethan ykethan added functions Issues tied to the functions category pending-response Issue is pending response from the issue author labels Jan 22, 2025
@yhnamgung-grooo
Copy link
Author

yhnamgung-grooo commented Jan 24, 2025

@ykethan

Resource handler returned message: "The runtime parameter of nodejs12.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use a supported runtime while creating or updating functions. (Service: Lambda, Status Code: 400, Request ID: a370720c-93d2-4537-ae58-6aef3e8180ec)" (RequestToken: 33854ff2-e532-d210-71a8-56fced9a9ed5, HandlerErrorCode: InvalidRequest)

A problem occurred while updating the �amplify cli.
I think it's a problem with the Runtime version of Lambda that you automatically create in the auth area.
Currently, there is no rollback and no push.

Is there a way to revert without removing cognito or other resources?
I want to go back to [email protected].
Before that, I want to solve this problem first.

Image

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Jan 24, 2025
@ykethan
Copy link
Member

ykethan commented Jan 24, 2025

@yhnamgung-grooo From the following AWS posts, the recommendation is to rollback the CloudFormation stack while skipping the Lambda function.
https://repost.aws/knowledge-center/cloudformation-lambda-deprecation
https://repost.aws/knowledge-center/cloudformation-update-rollback-failed

Could you try running this and then update the all the function templates to a supported node version?

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functions Issues tied to the functions category 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

2 participants