Wrong base64 encoding for userdata
lmineiro opened this issue · comments
The Senza::Elastigroup
component encodes the EC2 userdata script using base64.urlsafe_b64encode()
. When the input contains the character >
, the creation of the Elastigroup fails.
This happens because the URL implementation of Base64 encoding replaces the 62nd character with the character -
instead of the expected +
.
Botocore uses a different approach. This is the true base64 encoding.
Note: The patch command also uses the base64.urlsafe_b64encode()
function.
A brief test didn't show any error when using AWS Auto Scaling Group but it also caused the Elastigroup call to fail.