mardi 29 septembre 2015

aws ec2 describe-addresses won't show some instances

I'm scripting some stuff with aws ec2 describe-addresses, but, for some reason, some instances won't be returned by it.

Example:

$ aws ec2 describe-addresses --filter=Name=instance-id,Values=i-xxxxx 
{
    "Addresses": []
}

The given instanceId is valid and has addresses, but it just won't be shown by aws cli.

However, for another instances it seems to work just fine:

$ aws ec2 describe-addresses --filter='Name=instance-id,Values=i-yyyyyy'                                           
{
    "Addresses": [
        {
            "PrivateIpAddress": "X.X.X.X",
            "InstanceId": "i-yyyyyy",
            "NetworkInterfaceOwnerId": "XXXXXXXXXX",
            "Domain": "vpc",
            "AllocationId": "eipalloc-xxxxxx",
            "PublicIp": "Y.Y.Y.Y",
            "NetworkInterfaceId": "eni-xxxxxx",
            "AssociationId": "eipassoc-xxxxx"
        }
    ]
}

The keys I'm using have EC2FullAccess policy, so, it doesn't seem to be related to security...

What am I doing wrong? Any tips? Is there any limitations of aws cli that I'm not aware of?




Aucun commentaire:

Enregistrer un commentaire