Skip to content

User data exceeds 16kb #3700

Description

@razor54
│ Error: creating EC2 Launch Template (lt-0d19cc63e67d12cbf) Version: InvalidUserData.Malformed: User data is limited to 16384 bytes.
│ 	status code: 400, request id: d433057d-2bfb-4ce5-a121-26ad9048dbd2
│
│   with module.runners.module.runners.aws_launch_template.runner,
│   on .terraform/modules/runners/modules/runners/main.tf line 64, in resource "aws_launch_template" "runner":
│   64: resource "aws_launch_template" "runner" {
│
╵

I used to be able to run ~6.8kb of custom init scripts, but now I get the above error after updating from 5.3.0 to 5.6.0

-rw-r--r-- 1 andregaudencio staff 3.1K Feb 11  2023 post-install.sh
-rw-r--r-- 1 andregaudencio staff 3.7K Jan  2 11:50 user-data.sh

whilst the final base64 encoded string appears to be ~44kb,

-rw-r--r-- 1 andregaudencio staff 44K Jan  2 11:47 base64-string

Activity

  1. razor54 commented on Jan 2, 2024

    @razor54
    Author

    Also tested on 5.4.2 and got the same result. Reverted to 5.3.0

  2. npalm commented on Jan 12, 2024

    @npalm
    Member

    Please can anyone try the fix in PR #3717

  3. razor54 commented on Jan 15, 2024

    @razor54
    Author

    That worked for me :)

  4. added 2 commits that reference this issue on Jan 16, 2024
    f2bbcb1
    936f32a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions