Fix a bug when signing v2 and on an ec2 machine (using role).