this is not necessarily a metaflow question so fee...
# ask-metaflow
f
this is not necessarily a metaflow question so feel free to ignore/delete/etc. but i'm having lots of trouble deploying some updated userdata (for an EC2 launch template) via CFN. I keep getting a message saying my compute environment is invalid:
Copy code
"status": "INVALID",
  "statusReason": "CLIENT_ERROR - Launch Template UserData is not MIME multipart format",
the kicker is, if I put my old userdata back in, the one that worked last time i deployed, i get that same error. i can also take lightly modified data from this aws doc, base64 encode it, and put it into the yaml, and run into the same error. anybody else experiencing this? or have pointers?
āœ… 1
v
could you try to paste it from the console as plaintext:
If you add user data to a launch template in the Amazon EC2 console, you can paste it in as plaintext.
this rules out any issues with base64 encoding at least. The console might even give feedback about the text if it's incorrect
it is an annoyingly finicky format that they require šŸ˜•
f
Thanks for checking in on this. I think we found two issues (with AWS), but some context first. • we are using the golang aws sdk • we use taskrunner to automate some config that needs to happen for the deploy issues: 1. we didn't debug this so we don't know why, but it seems like we had to update the name of the launch template in order to get updated userdata into the compute environment when updating a specific stack. this was particularly pernicious because the latest userdata appeared in the CFN template in the CFN console. maybe it was a simple cache check or something. 2. despite the text in this document saying that there must be whitespace in the userdata, there's this seemingly unresolved github issue saying that newlines are not allowed in userdata so that was an interesting journey. hope if somebody else experiences those issues they can see this post! thanks again for your suggestion to paste the userdata as plain text!
v
ugh, that's good to know! Thanks for sharing and good to hear that you figured it out šŸ‘
šŸ™Œ 1