I\'m trying to connect to connect to amazon EC2 via fabric using the script below. But I\'m met with a problem that I\'m not sure how to solve it.
import os
I saw some places where Incorrect Padding error was resulted from binascii module and it was mostly when the string you pass has some extraneous white-space characters.
>>> import binascii
>>> binascii.a2b_base64('a')
Traceback (most recent call last):
File "", line 1, in
binascii.Error: Incorrect padding
In your case, it the various properties you set for your env
object. Do something like this for your key file location and see if that works.
filelocation = os.path.join(WORK,'aws/myproject.pem')
env.key_filename = [filelocation]