Amplify Push - Tokenizer ouput 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.2
Amplify CLI Version
12.1.1
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.
i did no change.
Describe the bug
When I run amplify push, I get this error: namefunction : function tokenizer template format error: the value field of every Outputs member must evaluate to a string and not a Map
Here’s my tokenizer output:
"Outputs": {
"Arn": {
"Value": {
"Ref": "LambdaLayerVersion******"
}
}
}
after amplify change the file tokenizer and put nothing in the output
Expected behavior
push the backend with amplify
Reproduction steps
amplify push
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.
Hi @JackDurden00,
We noticed this appears to be a duplicate of #13657, which was closed due to inactivity in June 2024. You're encountering the same CloudFormation template error with the Lambda Layer function "tokenizer" where the Outputs.Arn.Value field becomes an empty object {} instead of a proper reference.
To help us reproduce and resolve this issue, could you please provide the following information:
-
CloudFormation Template Content: Share the full content of your
amplify/backend/function/tokenizer/tokenizer-cloudformation-template.jsonfile, particularly:- The complete
Resourcessection (to see the Lambda Layer version logical IDs) - The complete
Outputssection
- The complete
-
Amplify CLI Version History:
- Have you upgraded from an older Amplify CLI version recently?
- What version were you using when the tokenizer layer was originally created?
-
Layer Configuration:
- Run
amplify statusand share the output - Is the tokenizer layer currently being used by any Lambda functions in your project?
- Run
-
Reproduction Steps: Since you mentioned this happened again after #13657, can you describe:
- What actions preceded the error this time?
- Did you run any Amplify commands before
amplify pushfailed?
-
Debug Logs: Run
amplify push --debugand share the relevant error output from~/.amplify/logs
This information will help us understand the specific state that causes the template corruption and create a proper fix. In the meantime, the workarounds from #13657 may help:
- Try recreating the layer with
amplify remove function→amplify add function - Or manually fix the Outputs section in the CloudFormation template
Thank you for your patience in helping us track down this issue!