boto / boto

For the latest version of boto, see https://github.com/boto/boto3 -- Python interface to Amazon Web Services

Home Page:http://docs.pythonboto.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unclear from documentation how to set latin1-encoded UserData in autoscaling.create_launch_configuration

tips-protocol opened this issue · comments

I need to set UserData as a latin1 encoded string. If I pass it as a python string in will be converted to bytes-object using encode('utf8') and then base-64 encoded.

The documentation says that UserData can only have type string:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/autoscaling.html#AutoScaling.Client.create_launch_configuration

But according to the code

if isinstance(user_data, six.text_type):

I can also pass it as bytes. I suggest updating the documentation to reflect this.