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

Function Tokenizer failed - The Value field of every Outputs member must evaluate to a String and not a Map. #13657

Closed
2 tasks done
JackDurden00 opened this issue Mar 18, 2024 · 18 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

@JackDurden00
Copy link

How did you install the Amplify CLI?

yarn

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

16.20

Amplify CLI Version

12.4.0

What operating system are you using?

Mac

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

No i nerver did a manuel changes on the function tokenizer.

Describe the bug

i did amplify push there are 4 days. (i add a variable on my graph)
and now i try to add another variable but when i use amplify push i have this error:

The following resources failed to deploy:
Resource Name: functiontokenizer (AWS::CloudFormation::Stack)
Event Type: update
Reason: Template format error: The Value field of every Outputs member must evaluate to a String and not a Map.
URL: https://console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/arn%3Aaws%3Acloudformation%3***********************************/events

so i try to just deleted my change (remove my change on my graph) and use amplify push again and i have the same error.

i dont understand because this function is supposed to be managed by Amplify.....

Expected behavior

i want to do the comand 'amplify push' with no error

Reproduction steps

amplify push:

The following resources failed to deploy:
Resource Name: functiontokenizer (AWS::CloudFormation::Stack)

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.
@JackDurden00 JackDurden00 added the pending-triage Issue is pending triage label Mar 18, 2024
@josefaidt
Copy link
Contributor

josefaidt commented Mar 19, 2024

Hey @JackDurden00 👋 thanks for raising this! By chance is this Function supported by a Lambda Layer? This seems related to #12076

@josefaidt josefaidt added functions Issues tied to the functions category pending-response Issue is pending response from the issue author labels Mar 19, 2024
@JackDurden00
Copy link
Author

Hey josefaidt,

i saw that but its not a function that i created like this issue(12076), its the function tokenizer.
that amplify generated.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Mar 19, 2024
@josefaidt
Copy link
Contributor

Hey @JackDurden00 thanks for clarifying! What stack is this coming from? Do you see any additional logs with --debug or from the last few lines in the latest log in ~/.amplify/logs?

@josefaidt josefaidt added the pending-response Issue is pending response from the issue author label Mar 19, 2024
@JackDurden00
Copy link
Author

JackDurden00 commented Mar 19, 2024

i have this with amplify push:
functiontokenizer AWS::CloudFormation::Stack UPDATE_FAILED

The following resources failed to deploy:
Resource Name: functiontokenizer (AWS::CloudFormation::Stack)
Event Type: update
Reason: Template format error: The Value field of every Outputs member must evaluate to a String and not a Map.
URL: https://console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/arn%3Aaws%3Acloudformation%3Aeu-central-1%3************2Famplify-mvl-stgxix-150*****ef7f81c828/events

🛑 Resource is not in the state stackUpdateComplete
Name: functiontokenizer (AWS::CloudFormation::Stack), Event Type: update, Reason: Template format error: The Value field of every Outputs member must evaluate to a String and not a Map., IsCustomResource: false

debug mode dont give me more info :(

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Mar 19, 2024
@ykethan
Copy link
Member

ykethan commented Mar 21, 2024

Hey @JackDurden00, could you run amplify diagnose --send-report and provide us the project identifier output.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Mar 21, 2024
@JackDurden00
Copy link
Author

There was a error with the sending diagnose:

amplify diagnose --send-report

✅ Report saved: /var/folders/tx/0bp****************/T/mvl/report-1711120840727.zip

⠙ Sending zip
DiagnoseReportUploadError
✖ Sending zip

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Mar 22, 2024
@ykethan
Copy link
Member

ykethan commented Mar 22, 2024

@JackDurden00 could you email us your amplify folder to [email protected]? this would enable us in diving deeper into the issue.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Mar 22, 2024
@JackDurden00
Copy link
Author

OK, i sent it.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Mar 22, 2024
@ykethan
Copy link
Member

ykethan commented Mar 22, 2024

Hey @JackDurden00, thank you for information. On diving into the diagnose report, did notice the functiontokenizer is a lambda layer (tokenizer) under the function folder. Tried to reproduce the issue using the lambda layer but did not observe this error message on a push.
Could you try invoking an update on the layer by adding a small dependancy then running amplify push, this should re-build the templates?
if the above does note mitigate the issue, did notice the functions did not have a dependancy on this layer, could you try recreating the layer?

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Mar 22, 2024
@JackDurden00
Copy link
Author

Hey @ykethan, sorry for the delay.
i dont understand the invoking an update on the function.
there are a command for update the function tokenizer ?

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Apr 16, 2024
@ykethan
Copy link
Member

ykethan commented Apr 17, 2024

@JackDurden00 we can trigger an update on the Lambda layer by adding a package in the package.json in the functions/<layer-name> folder

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Apr 17, 2024
@JackDurden00
Copy link
Author

Ah ok,

but when i did 'amplify status', the function tokenizer is already 'update'.
So i try to change a package ?

and i dont knwo why sometimes this function is in update because i change nothing.

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Apr 17, 2024
@JackDurden00
Copy link
Author

I encountered this error some months ago, but I recreated a new environment with Amplify. However, I'm unable to do it again now because the database is very large.

@ykethan
Copy link
Member

ykethan commented Apr 18, 2024

@JackDurden00 yes if run a push with a new package do observe a error?
if you still run into a error and a function does not depend Lambda layer could you try running amplify remove function -> select the Lambda layer called tokenizer. The re-add the layer using amplify add function.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Apr 18, 2024
@JackDurden00
Copy link
Author

"Hey @ykethan, I keep encountering the same error whenever I update the package.json for the 'tokenizer' function. If I decide to remove the function, should I run 'amplify push' afterward, or should I directly run the 'add function' command?"

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Apr 18, 2024
@ykethan
Copy link
Member

ykethan commented Apr 18, 2024

@JackDurden00 either is fine. you can run push with --debug before just to ensure they are no errors.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Apr 18, 2024
@ykethan
Copy link
Member

ykethan commented Jun 11, 2024

Closing the issue due to inactivity. Do reach out to us if you are still experiencing this issue

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2024
Copy link

This issue is now closed. 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.

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

3 participants