amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Amplify Push - Tokenizer ouput String and not a Map

Open JackDurden00 opened this issue 2 months ago • 1 comments

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.

JackDurden00 avatar Oct 15 '25 13:10 JackDurden00

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:

  1. CloudFormation Template Content: Share the full content of your amplify/backend/function/tokenizer/tokenizer-cloudformation-template.json file, particularly:

    • The complete Resources section (to see the Lambda Layer version logical IDs)
    • The complete Outputs section
  2. 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?
  3. Layer Configuration:

    • Run amplify status and share the output
    • Is the tokenizer layer currently being used by any Lambda functions in your project?
  4. 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 push failed?
  5. Debug Logs: Run amplify push --debug and 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 functionamplify add function
  • Or manually fix the Outputs section in the CloudFormation template

Thank you for your patience in helping us track down this issue!

pahud avatar Oct 21 '25 17:10 pahud