I wrote a function to test AWS keys by simply creating an ec2 connection object
import boto.ec2 try: ec2Conn = boto.ec2.connect_to_region(region, aws_access_key_id=access_key, aws_secret_access_key=secret_key) return ec2Conn except boto.exception.EC2ResponseError as e: print e
But even if the secret key is wrong, it creates an ec2 connection object.
So, I check the access key and the secret key, extracting the areas,
region = ec2Conn.get_all_regions()
Is there any method or method, and not a selection area, for checking the access key and secret key?
naga4ce
source share