Giter VIP home page Giter VIP logo

aws-cli's People

Contributors

aburmesedev avatar allisaurus avatar aws-sdk-python-automation avatar awserik avatar awstools avatar bisdavid avatar danielgtaylor avatar dstufft avatar elysahall avatar eronhennessey avatar garnaat avatar hssyoo avatar jamesls avatar jogusd avatar jordonphillips avatar julieso avatar justindho avatar kdaily avatar kyleknap avatar mtdowling avatar mwunderl avatar nateprewitt avatar quiver avatar rayluo avatar sanathkr avatar sdiao avatar shigemk2 avatar stealthycoin avatar vz10 avatar yuxiang-zhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-cli's Issues

Fix ec2 import-key-pair

On Ubuntu 12.04 I ran ssh-keygen and wrote the output to particular (non-default) file.

When I try to use the 'aws ec2 import-key-pair' command it fails, complaining the .pub file isn't in OpenSSH format. However the same key works fine with the java CLI tools.

Error in cloudformation help command

Here is the error I get

(website)kenshi:~$ aws cloudformation help
Traceback (most recent call last):
  File "/workspace/envs/website/bin/aws", line 24, in <module>
    main()
  File "/workspace/envs/website/bin/aws", line 20, in main
    driver.main()
  File "/workspace/envs/website/lib/python2.7/site-packages/awscli/clidriver.py", line 348, in main
    args = self.create_service_parser(remaining)
  File "/workspace/envs/website/lib/python2.7/site-packages/awscli/clidriver.py", line 131, in create_service_parser
    get_help(self.session, service=self.service, style='cli')
  File "/workspace/envs/website/lib/python2.7/site-packages/awscli/help.py", line 334, in get_help
    doc.build(service)
  File "/workspace/envs/website/lib/python2.7/site-packages/awscli/help.py", line 256, in build
    self.do_operation_summary(operation)
  File "/workspace/envs/website/lib/python2.7/site-packages/awscli/help.py", line 248, in do_operation_summary
    self.help_parser.feed(operation.documentation)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 108, in feed
    self.goahead(0)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 150, in goahead
    k = self.parse_endtag(i)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 317, in parse_endtag
    self.error("bad end tag: %r" % (rawdata[i:j],))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/HTMLParser.py", line 115, in error
    raise HTMLParseError(message, self.getpos())
HTMLParser.HTMLParseError: bad end tag: u'</Physic\nalResourceId>', at line 311, column 73

aws ec2 replace-route: The parameter destinationCidrBlock is not recognized

This isn't a camelCase vs. InitialCamelCase issue, is it? :-)

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-ReplaceRoute.html

$ aws ec2 --region ap-southeast-2 replace-route --route-table-id rtb-e87a9681 --destination-cidr-block 0.0.0.0/0 --instance-id i-d97a36e3 
{
    "Response": {
        "Errors": {
            "Error": {
                "Message": "The parameter destinationCidrBlock is not recognized", 
                "Code": "UnknownParameter"
            }
        }, 
        "RequestID": "1603aba7-40aa-4c2c-aa50-5fc7c6faa032"
    }
}
A client error (UnknownParameter) occurred: The parameter destinationCidrBlock is not recognized

aws sqs get-queue attributes - no result

Hello,

When using "aws sqs get-queue-attributes", the result always comes up blank:

$ aws sqs get-queue-attributes --queue-url https://queue.amazonaws.com/1234/sample_queue
{
    "ResponseMetadata": {
        "RequestId": "edfaceaa-a8a6-59b6-9e75-87f13e5d1da6"
    }
}

And if I try to specify a specific attribute (e.g. All or ApproximateNumberOfMessagesNotVisible), I get an error:

$ aws sqs get-queue-attributes --queue-url https://queue.amazonaws.com/1234/sample_queue --attribute-names ApproximateNumberOfMessagesNotVisible
{
    "ErrorResponse": {
        "RequestId": "7e742e72-b760-5881-a799-672920ab7f3b", 
        "Error": {
            "Message": "Top level element may not be treated as a list", 
            "Code": "MalformedInput", 
            "Type": "Sender", 
            "Detail": ""
        }
    }
}
A client error (Unknown) occurred: Unknown

Let me know if I can help. Thanks for the great tool!

Maan

Syntax for template parameters with cloudformation create-stack is inscruitable

Given a simple template:

{
    "AWSTemplateFormatVersion":"2010-09-09",
    "Description":"Example template",
    "Parameters":{
        "ExampleParameter":{
            "Type":"Number"
        }
    },
    "Resources":{
        "ExampleVolume":{ 
            "Type":"AWS::EC2::Volume",
            "Properties":{
                "AvailabilityZone":"us-east-1a",
                "Size":"10",
                "Tags": [ 
                    { "FirstTag" : { "Ref" : "ExampleParameter" } }
                ]
    }
}

then the syntax for providing a value for ExampleParameter on the command line is ... well, I can't work it out.

I'm using the following:

aws cloudformation create-stack --stack-name test-stack --template-body "<template>" --parameters file:parameters-file

and the contents of parameters-file as being any of:

["ExampleParameter":1234]
["ExampleParameter":"1234"]
{ ["ExampleParameter":"1234"] }
[{"Parameter":{"ParameterKey":"ExampleParameter","ParameterValue":"1234"}}]
{ "Parameters": [ "ExampleParameter":{"ParameterKey":"ExampleParameter","ParameterValue":"1234"}]}

and a bunch of other, more wacky manglings, but I just cannot get it to work.

Edit: many of the bad inputs get response from botocore like:

Expecting , delimiter: line 1 column 19 (char 19)

and those inputs that do get parsed get a response from AWS like:

{
"ErrorResponse": {
    "RequestId": "d0fc4af5-7a55-11e2-afd2-23222bc4e432", 
    "Error": {
        "Message": "Template requires parameter: ExampleParameter", 
        "Code": "ValidationError", 
        "Type": "Sender"
    }
}
}

Some examples or advice would be welcome ...

aws elb is not working for ap-southeast-2

No elb command can be executed due to SSL handshake failure:

# aws elb describe-load-balancers --region ap-southeast-2 
hostname 'elasticloadbalancing.ap-southeast-2.amazonaws.com' doesn't match u'elasticloadbalancing.ap-southeast-2.amazon.com'

Working fine for other regions:

# aws elb describe-load-balancers --region us-west-1                                          
{
    "LoadBalancerDescriptions":

....

bash completion issue: --include-all-instances can't be used with describe-instance-status

When using tab completion with describe-instance-status it shows --include-all-instances as a possible option, but when you try to use it, you get told it's not a valid option for this function.

$ aws ec2 describe-instance-status --include-all-instances 
{
    "Response": {
        "Errors": {
            "Error": {
                "Message": "The parameter includeAllInstances is not recognized", 
                "Code": "UnknownParameter"
            }
        }, 
        "RequestID": "15bdcd8d-fd43-4f71-869f-ae23bfa51298"
    }
}

Unfortunately I don't know enough about bash completions to provide a PR myself :/

Python 3 support...?

The website says "2.6 or higher" -- does that include 3.x ?

If not, do you plan to support it at one point or another?

Incorrect names for some commands during completion

Hi Mitch-

Noticed that a few commands don't print the correct name if you make an error in the usage:

$ aws elb register-instances-with-load-balancer 
usage: aws elasticloadbalancing register-instances-with-load-balancer
   --instances [INSTANCES [INSTANCES ...]] --load-balancer-name
   LOAD_BALANCER_NAME
$ aws elasticloadbalancing register-instances-with-load-balancer
aws: error: argument service_name: invalid choice: 'elasticmapreduce' (choose from u'iam', u'ses', u'rds', u'elb', u'autoscaling', u'cloudwatch', u'sqs', u'cloudformation', u'elasticbeanstalk', u'sns', u'sts', u'directconnect', u'emr', u'ec2', 'help')


$ aws emr terminate-job-flows
usage: aws elasticmapreduce terminate-job-flows --job-flow-ids
                                            [JOB_FLOW_IDS [JOB_FLOW_IDS ...]]
$ aws elasticmapreduce terminate-job-flows
aws: error: argument service_name: invalid choice: 'elasticmapreduce' (choose from u'iam', u'ses', u'rds', u'elb', u'autoscaling', u'cloudwatch', u'sqs', u'cloudformation', u'elasticbeanstalk', u'sns', u'sts', u'directconnect', u'emr', u'ec2', 'help')

Also, the u'' seems to be an artifact of python quoting, not sure if there's an easy way to fix that?

Cheers,
Nate

SES calls erroring with "Could not find operation..."

I'm consistently getting this for all SES operations after a clean install:

$ aws ses get-send-statistics
{
    "ErrorResponse": {
        "RequestId": "8ea59e6c-6323-11e2-bdb9-7dc0419800e2", 
        "Error": {
            "Message": "Could not find operation GetSendStatistics for version 2012-12-01", 
            "Code": "InvalidAction", 
            "Type": "Sender"
        }
    }
}
A client error (Unknown) occurred: Unknown

Is it possible there is some other library that I need to install?

For autoscalling terminate-instance-in-auto-scaling-group --should-decrement-desired-capacity should be optional

There should be some way to use the terminate-instance-in-auto-scaling-group operation without decrementing the desired capacity of a group.

$ aws autoscaling terminate-instance-in-auto-scaling-group --instance-id i-C60243E1
usage: aws autoscaling terminate-instance-in-auto-scaling-group
--instance-id INSTANCE_ID --should-decrement-desired-capacity
aws autoscaling terminate-instance-in-auto-scaling-group: error: argument --should-decrement-desired-capacity is required

$ aws autoscaling terminate-instance-in-auto-scaling-group --instance-id i-C60243E1 --should-decrement-desired-capacity false
Something is wrong. We have leftover options
['false']

debug option directly imports httplib

This breaks in python3:

$ aws --debug ses get-send-quota                                                                                                           
Traceback (most recent call last):
  File "/Users/j/.virtualenvs/aws-cli3/bin/aws", line 7, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/Users/j/Source/aws-cli/bin/aws", line 24, in <module>
    main()
  File "/Users/j/Source/aws-cli/bin/aws", line 20, in main
    driver.main()
  File "/Users/j/Source/aws-cli/awscli/clidriver.py", line 340, in main
    import httplib
ImportError: No module named 'httplib'

We can use http_client from six.moves to fix this.

aws ec2 attach-internet-gateway: The parameter vpcId is not recognized

When using tab completion with attach-internet-gateway it shows --vpc-id as a possible option, but when I try to use it, I get this error below.

$ aws ec2 attach-internet-gateway --vpc-id vpc-XXXXXXXX --internet-gateway-id igw-XXXXXXXX
{
    "Response": {
        "Errors": {
            "Error": {
                "Message": "The parameter vpcId is not recognized", 
                "Code": "UnknownParameter"
            }
        },
        "RequestID": "64ffb471-ef85-4a77-a542-6b7141ea04d7"
    }
}
A client error (UnknownParameter) occurred: The parameter vpcId is not recognized

AWS was not able to validate the provided access credentials

Got credentials from AWS, created the config file (i changed my credentials below for this ticket but i use the ones i get from AWS in the file):

$ cat $AWS_CONFIG_FILE [default]
aws_access_key_id = KIATYMUMIQART5CUYRWI
aws_secret_access_key = HgRLaY1r4cUYJlaTnZl4CgIafYNu4iKRVDa3PDPM
region = eu-west-1

$ python2.7 --version Python 2.7.3

I installed botocore from git. Then I install aws-cli from git. Please take a look at this gist for what happens when I issue commands.

aws ec2 modify-image-attribute appears broken in 0.6.0

Given an existing AMI:

aws ec2 modify-image-attribute \
    --image-id ami-d00dbeef --launch-permission '{"add":[{"user_id":"123456789012"}]}'

returns the error:

{
    "Response": {
        "Errors": {
            "Error": {
                "Message": "Value (<bound method ListParameter) for parameter QueryStringParameter is invalid. Invalid or illegal XML character specified", 
                "Code": "InvalidParameterValue"
            }
        }, 
    "RequestID": "232bab5b-71d4-4bdd-b6df-0e58a3c199ed"
    }
}

Attempting to use the other method (as half-documented in the help) gives a different error:

aws ec2 modify-image-attribute \
    --image-id ami-d00dbeef \
    --operation-type add --user-ids 0123456789012

"Error": {
    "Message": "An internal error has occurred", 
    "Code": "InternalError"
}

Note this error occurs whether you use a single user ID, or a list (of the form '["0123456789012"]' )

aws iam put-user-policy appears broken in 0.6.0

using:
aws-cli/0.6.0 Python/2.7.3 Linux/3.7.6-102.fc17.x86_64

gives the stack trace:

$ aws iam put-user-policy --user-name snoopy --policy-name tooty
Traceback (most recent call last):
  File "/usr/bin/aws", line 24, in <module>
    main()
  File "/usr/bin/aws", line 20, in main
    driver.main()
  File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 315, in main
    args = self.create_service_parser(remaining)
  File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 136, in create_service_parser
    return self.create_operation_parser(remaining)
  File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 167, in create_operation_parser
    type=self.type_map[param.type],
KeyError: u'jsondoc'

supplying the policy as a document on the command-line as raw JSON has the same issue.

S3 support

I was wondering if S3 support is planned for aws-cli ?

Thanks.

IAM roles: 'NoneType' object has no attribute 'access_key'

I have created an IAM role (using the VPC Full Access template, unedited, which includes ec2:DescribeInstances), launched an Ubuntu 12.04 LTS t1.micro with it attached, and installed aws-cli with easy_install...

ubuntu@ip-10-128-3-5:~$ curl http://169.254.169.254/latest/meta-data/iam/info && echo
{
  "Code" : "Success",
  "LastUpdated" : "2012-12-26T23:44:36Z",
  "InstanceProfileArn" : "arn:aws:iam::*REMOVED*:instance-profile/vpc-nat",
  "InstanceProfileId" : "*REMOVED*"
}
ubuntu@ip-10-128-3-5:~$ curl http://169.254.169.254/latest/meta-data/iam/security-credentials/vpc-nat && echo
{
  "Code" : "Success",
  "LastUpdated" : "2012-12-26T23:44:38Z",
  "Type" : "AWS-HMAC",
  "AccessKeyId" : "*REMOVED*",
  "SecretAccessKey" : "*REMOVED*",
  "Token" : "*REMOVED*",
  "Expiration" : "2012-12-27T06:07:57Z"
}
ubuntu@ip-10-128-3-5:~$ aws ec2 --region ap-southeast-2 describe-instances
'NoneType' object has no attribute 'access_key'

Per strace, two of the final things it tries to do is:

open("/etc/boto.cfg", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("/home/ubuntu/.boto", O_RDONLY)    = -1 ENOENT (No such file or directory)

And the debug log:

ubuntu@ip-10-128-3-5:~$ aws --debug ec2 --region ap-southeast-2 describe-instances
2012-12-27 00:21:06,965 - botocore.base - DEBUG - Attempting to Load: aws/_services/ec2
2012-12-27 00:21:06,965 - botocore.base - DEBUG - Attempting to Load: aws
2012-12-27 00:21:06,965 - botocore.base - DEBUG - Attempting to Load: aws/_services
2012-12-27 00:21:06,966 - botocore.base - DEBUG - Found data file: /usr/local/lib/python2.7/dist-packages/botocore-0.4.1-py2.7.egg/botocore/data/aws/_services.json
2012-12-27 00:21:06,966 - botocore.base - DEBUG - Attempting to Load: aws/_services/ec2
2012-12-27 00:21:06,966 - botocore.base - DEBUG - Attempting to Load: aws/ec2
2012-12-27 00:21:06,996 - botocore.base - DEBUG - Found data file: /usr/local/lib/python2.7/dist-packages/botocore-0.4.1-py2.7.egg/botocore/data/aws/ec2.json
2012-12-27 00:21:07,064 - botocore.endpoint - DEBUG - {}
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/awscli-0.4.4-py2.7.egg/awscli/clidriver.py", line 296, in call
    **params)
  File "/usr/local/lib/python2.7/dist-packages/botocore-0.4.1-py2.7.egg/botocore/operation.py", line 42, in call
    return endpoint.make_request(self, params)
  File "/usr/local/lib/python2.7/dist-packages/botocore-0.4.1-py2.7.egg/botocore/endpoint.py", line 78, in make_request
    headers={'User-Agent': user_agent})
  File "/usr/local/lib/python2.7/dist-packages/requests-0.14.2-py2.7.egg/requests/api.py", line 98, in post
    return request('post', url, data=data, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests-0.14.2-py2.7.egg/requests/safe_mode.py", line 39, in wrapped
    return function(method, url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests-0.14.2-py2.7.egg/requests/api.py", line 51, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests-0.14.2-py2.7.egg/requests/sessions.py", line 228, in request
    args = dispatch_hook('args', args['hooks'], args)
  File "/usr/local/lib/python2.7/dist-packages/requests-0.14.2-py2.7.egg/requests/hooks.py", line 44, in dispatch_hook
    _hook_data = hook(hook_data)
  File "/usr/local/lib/python2.7/dist-packages/botocore-0.4.1-py2.7.egg/botocore/auth.py", line 77, in add_auth
    args['params']['AWSAccessKeyId'] = self.credentials.access_key
AttributeError: 'NoneType' object has no attribute 'access_key'

Note that if I supply AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, it works as expected.

Clarifications in README.md

A couple of suggestions to clarify for Python newbies:

Say that if you're just interested in installing and using, there's no need to download anything, just run the "easy_install" from a command line.

Also, please clarify what files are meant by the following line:

"You should add this to your startup scripts to enable it for future sessions."

Do you mean in files like "~/.bash_profile"? Do you mean Python startup scripts? Is so, what files?

Thanks,
Randy K

"aws ec2 create-tags" not working

When issuing:
aws ec2 create-tags --region ap-southeast-2 --resource i-bdc0bc80 --tags '{ "key":"Name","value":"test" }'

error is returned : "The parameter Item is not recognized"

Debug is showing that awscli is posting "ResourceId.1=i-bdc0bc80&Action=CreateTags&Item.1.Key=Name&Item.1.Value=test"

However http://awsdocs.s3.amazonaws.com/EC2/latest/ec2-api.pdf is defining CreateTags with ResourceId.n, Tag.n.Key and Tag.n.Value parameters but not "Item" parameters.

authorize-security-groups-ingress - issue with IPPermissions

Blanked out the group ID and IP from below.

{
    "Response": {
        "Errors": {
            "Error": {
                "Message": "The parameter Item is not recognized", 
                "Code": "UnknownParameter"
            }
        }, 
        "RequestID": "4615d404-4ebe-4805-9d2b-c3b2eeff440d"
    }
}
A client error (UnknownParameter) occurred: The parameter Item is not recognized

Debug info below. List structure based on complex paramater input example:

013-02-11 11:59:17,547 - botocore.credentials - INFO - Found credentials in config file
2013-02-11 11:59:17,547 - botocore.operation - DEBUG - {u'ip_permissions': [{u'to_port': 443, u'ip_protocol': u'tcp', u'ip_ranges': [u'000.000.000.000']}], u'group_id': 'sg-00000000'}
2013-02-11 11:59:17,547 - botocore.operation - DEBUG - {u'ip_permissions': [{u'to_port': 443, u'ip_protocol': u'tcp', u'ip_ranges': [u'000.000.000.000']}], u'group_id': 'sg-00000000'}
2013-02-11 11:59:17,547 - botocore.parameters - DEBUG - label=Item.1
2013-02-11 11:59:17,547 - botocore.parameters - DEBUG - label=Item.1.ToPort
2013-02-11 11:59:17,547 - botocore.parameters - DEBUG - label=Item.1.IpProtocol
2013-02-11 11:59:17,547 - botocore.parameters - DEBUG - label=Item.1
2013-02-11 11:59:17,548 - botocore.parameters - DEBUG - label=
2013-02-11 11:59:17,548 - botocore.endpoint - DEBUG - {u'Item.1.IpProtocol': 'tcp', u'Item.1.ToPort': '443', u'GroupId': 'sg-00000000'}
2013-02-11 11:59:17,548 - botocore.endpoint - DEBUG - SSL Verify: True
2013-02-11 11:59:17,549 - botocore.auth - DEBUG - string_to_sign
2013-02-11 11:59:17,549 - botocore.auth - DEBUG - POST

AWS Describe Instance Attribute broken?

Keep getting this kind of error when trying to do some of these commands.

BobBookPro:~ bob$ aws ec2 describe-instance-attribute --instance-id i-XXXXXX --attribute blockDeviceMapping
{
    "Response": {
        "Errors": {
            "Error": {
                "Message": "The parameter instanceId is not recognized", 
                "Code": "UnknownParameter"
            }
        }, 
        "RequestID": "ff2f17e3-2b53-4c8a-baa7-2a9da607c840"
    }
}
A client error (UnknownParameter) occurred: The parameter instanceId is not recognized

Bug in CloudWatch endpoint

Hi guys,

It looks like there is a bug when computing the endpoint to talk to for CloudWatch.

For the Sydney region (ap-southeast-2) the aws tools compute the following endpoint for the cloudwatch service:

cloudwatch.ap-southeast-2.amazonaws.com

The correct endpoints are of the form:

monitoring.<region>.amazonaws.com

Traceback with --debug specified on the command line is:

Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/awscli-0.4.5-py2.6.egg/awscli/clidriver.py", line 296, in call
*_params)
File "/usr/lib/python2.6/site-packages/botocore-0.4.2-py2.6.egg/botocore/operation.py", line 42, in call
return endpoint.make_request(self, params)
File "/usr/lib/python2.6/site-packages/botocore-0.4.2-py2.6.egg/botocore/endpoint.py", line 79, in make_request
headers={'User-Agent': user_agent})
File "/usr/lib/python2.6/site-packages/requests-0.14.1-py2.6.egg/requests/api.py", line 99, in post
return request('post', url, data=data, *_kwargs)
File "/usr/lib/python2.6/site-packages/requests-0.14.1-py2.6.egg/requests/safe_mode.py", line 39, in wrapped
return function(method, url, *_kwargs)
File "/usr/lib/python2.6/site-packages/requests-0.14.1-py2.6.egg/requests/api.py", line 52, in request
return session.request(method=method, url=url, *_kwargs)
File "/usr/lib/python2.6/site-packages/requests-0.14.1-py2.6.egg/requests/sessions.py", line 241, in request
r.send(prefetch=prefetch)
File "/usr/lib/python2.6/site-packages/requests-0.14.1-py2.6.egg/requests/models.py", line 631, in send
raise ConnectionError(sockerr)
ConnectionError: [Errno -2] Name or service not known

Cheers,
Adrian.

Lists inconsistency

When creating autoscaling group in vpc, availability zones list style is different from subnet identifiers list. One is using comma as separator, other - space. Despite this is mentioned in documentation, this inconsistency is very frustrating.

aws autoscaling create-auto-scaling-group --availability-zones ap-southeast-2a ap-southeast-2b --vpc-zone-identifier subnet-c79e76ae,subnet-d89e76b1

--vpc-zone-identifier (string)
    A comma-separated list of subnet identifiers of Amazon Virtual Private Clouds (Amazon VPCs).
--availability-zones (list)
    A list of Availability Zones for the Auto Scaling group. 

JSON output not mapping xmlnames to key names

The JSON models for operation output can optionally include xmlname attributes. These attributes show how the data is represented in the XML response from the service. However, the returned JSON should really be using these xmlname attributes to map the response XML elements back to the key names in the output structure. The current code is not doing this.

For example, the DescribeInstances operation in EC2 has an output definition that starts like this:

"output": {
  "members": {
    "Reservation": {
        xmlname: "reservationSet"
     }  
}

Currently, botocore produces a JSON structure that looks like this:

{'reservationSet': […] }

But it really should be:

{'Reservation': [...]}

To maintain compatibility with other AWS SDK's and tools, this really needs to be fixed in botocore. Unfortunately, this may cause problems if current users are processing the JSON responses with tools like jq. This will require that they update their path specifications.

List input formatting?

When creating autoscale groups, I came across a problem trying to send it a list for availability zones. What is the proper syntax/format for the list type params?

Incorrect install instructions on aws-cli homepage

One should do pip install awscli, not aws-cli.

almad@namtar ~/program_files/aws-cli $ pip install aws-cli

Downloading/unpacking aws-cli
Could not find any downloads that satisfy the requirement aws-cli
No distributions at all found for aws-cli
Storing complete log in /home/almad/.pip/pip.log

text output format empty

I am not sure if this an error or default condition, when listing stuff in text format instead of default json, data is lost/unavailable.

When i listed identities for SES in json i could see the identity
[_@+++ tmp]# aws ses list-identities --output json
{
"Identities": [
"example.com"
],
"ResponseMetadata": {
"RequestId": "51
_
*****_2-ade8-1_********5"
}
}

for text format only metadata is available

[****@+++ tmp]# aws ses list-verified-email-addresses --output text

RESPONSEMETADATA 3**************11e2-8d25-535d********a

ec2 run-instances requires user data file to be BASE64 encoded

When running the command aws ec2 run-instances command passing a user-data file parameter an error is returned that the file needs to be BASE64 encoded. Surely the cli should do this for the user, no?

Error message is as follows:

{
"Response": {
"Errors": {
"Error": {
"Message": "Invalid BASE64 encoding of user data",
"Code": "InvalidParameterValue"
}
},
"RequestID": "3e0ee5b2-7926-4893-9c86-80308da02031"
}
}

Select profile via environment variable

I work with several different AWS accounts, in different regions. I'm just starting to work with the aws-cli tools (great implementation BTW), but already see that it would be very nice to be able to select a profile based on an environment variable. I could keep all my account information in one place, not scattered between environment variables, scripts, and credential files.

I'd suggest something like AWS_CLI_PROFILE as the variable name.

zsh auto completion

Hi,

On Twitter @solarce asked for zsh support of the bash auto completion. He's not the only one ;-).
Luckily, zsh has a bash completion mode. Unfortunately, it seems to be broken.

Here's the steps necessary:

  1. put this in your .zshrc after compinit
autoload -U bashcompinit
bashcompinit
  1. Set up
complete -C aws_completer aws

If your zsh bashcompinit works that should be it.

If not, you need to extend the zsh bashcompinit _bash_complete() function to export COMP_POINT and COMP_LINE.
That is the diff against the zsh v5.0 file.

14a15,16
>   export COMP_POINT
>   export COMP_LINE

IMHO, it would be better to add a zsh completion that is evaluated when the shell is started. That completion config is kept in zsh RAM until the shell is terminated. The benefit is that the Python interpreter does not have to be started each time one hits . I'll give that a try after Christmas. Not sure if I get it done since I haven't written such a zsh compdef function so far.

Example register-instances-with-load-balancer

I cannot get the formatting correct for inserting new instance ids into a load-balancer.

I've tried variants of:
aws elb register-instances-with-load-balancer --load-balancer-name my-lb --instances i-1234567 i-984561

and variants of:
aws elb register-instances-with-load-balancer --instances '{"instances":[{"InstanceId":"i-1234567"},{"InstanceId":"i-9876543"}]}' --load-balancer-name my-lb

SNS Subscribe command fails

Running the following command:

aws sns subscribe --endpoint [email protected] --protocol email --topic-arn $TOPIC_ARN

Results in the following error message:

usage: aws sns subscribe --endpoint ENDPOINT --protocol PROTOCOL --topic-arn
                         TOPIC_ARN
aws sns subscribe: error: argument --endpoint is required

The endpoint parameter is clearly defined. I've tried an array of different values for the parameter, but I shouldn't be getting this error when the parameter is clearly defined, even if it's in the wrong format.

The other aws sns methods seem to be working perfectly fine, however.

Trying to complete --profile causes traceback

packages/awscli/completer.py", line 38, in complete_std_option_value
    return_choices(session.available_profiles())
TypeError: 'list' object is not callable

So, botocore.session.Session.available_profiles() has a @Property decorator and returns a list
https://github.com/boto/botocore/blob/58de636be0012ef46b344cf033a74e4d21bcdaf7/botocore/session.py#L94

Thus, the fix would be to remove the brackets in
https://github.com/aws/aws-cli/blob/develop/awscli/completer.py#L38

License unclear (MIT & AL2)

In setup.py, it specifies "License :: OSI Approved :: MIT License", and in LICENSE.txt, it specifies "Apache License, Version 2.0".

These should be consistent.

easy_install and pip failing on requirement "requests>=0.12.1,<1.0.0" (i.e. 0.14.2)

Looks like the version of requests that is being pulled as part of awscli requirements (0.14.2) has a bug in setup.py. Considering it's an old release, awscli should either pin a different release (0.14.1 seems to work) or target a more recent build. For the record, installing chardet2 does not make any difference.

This is the traceback under python 3.3, OSX 10.8.2

Downloading/unpacking requests>=0.12.1,<1.0.0 (from botocore>=0.4.0->awscli)
  Downloading requests-0.14.2.tar.gz (361kB): 361kB downloaded
  Running setup.py egg_info for package requests
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/Users/toyg/Dev/awscli/build/requests/setup.py", line 6, in <module>
        import requests
      File "requests/__init__.py", line 52, in <module>
        from . import utils
      File "requests/utils.py", line 22, in <module>
        from .compat import parse_http_list as _parse_list_header
      File "requests/compat.py", line 112, in <module>
        from .packages import chardet2 as chardet
    ImportError: cannot import name chardet2
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/Users/toyg/Dev/awscli/build/requests/setup.py", line 6, in <module>

    import requests

  File "requests/__init__.py", line 52, in <module>

    from . import utils

  File "requests/utils.py", line 22, in <module>

    from .compat import parse_http_list as _parse_list_header

  File "requests/compat.py", line 112, in <module>

    from .packages import chardet2 as chardet

ImportError: cannot import name chardet2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.