amplify-cli
amplify-cli copied to clipboard
Function Tokenizer failed - The Value field of every Outputs member must evaluate to a String and not a Map.
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:
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
Hey @JackDurden00 :wave: thanks for raising this! By chance is this Function supported by a Lambda Layer? This seems related to https://github.com/aws-amplify/amplify-cli/issues/12076
Hey josefaidt,
i saw that but its not a function that i created like this issue(12076), its the function tokenizer. that amplify generated.
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
?
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-150ef7f81c828/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 :(
Hey @JackDurden00, could you run amplify diagnose --send-report
and provide us the project identifier output.
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
@JackDurden00 could you email us your amplify folder to [email protected]
? this would enable us in diving deeper into the issue.
OK, i sent it.
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?
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 ?
@JackDurden00 we can trigger an update on the Lambda layer by adding a package in the package.json
in the functions/<layer-name>
folder
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.
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.
@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
.
"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?"
@JackDurden00 either is fine. you can run push with --debug
before just to ensure they are no errors.
Closing the issue due to inactivity. Do reach out to us if you are still experiencing this issue
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.