

def assert_credentials_are_valid(self, parameters):
    "Contacts AWS to see if the given access key and secret key represent a\n    valid set of credentials.\n\n    Args:\n      parameters: A dict containing the user's AWS access key and secret key.\n    Raises:\n      AgentConfigurationException: If the given AWS access key and secret key\n      cannot be used to make requests to AWS.\n    "
    conn = parameters.open_connection(parameters)
    try:
        conn.get_all_instances()
    except EC2ResponseError:
        raise AgentConfigurationException(("We couldn't validate your EC2 " + 'access key and EC2 secret key. Are your credentials valid?'))

dataset/ETHPy150Open AppScale/appscale-tools/lib/agents/ec2_agent.py EC2Agent.assert_credentials_are_valid/VarMisuse@16/144 `self`->`parameters`