Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apigateway::put-integration command results in KeyError: u'http_method' #1595

Closed
quiver opened this issue Oct 27, 2015 · 6 comments
Closed
Assignees
Labels
bug This issue is a bug.

Comments

@quiver
Copy link
Contributor

quiver commented Oct 27, 2015

API http://docs.aws.amazon.com/cli/latest/reference/apigateway/put-integration.html

There's no example code in the documentation, so my usage might be wrong. Anyway, this error occurs in client-side(AWS-CLI) before requesting to the server.

$ aws apigateway put-integration --rest-api-id a --resource-id b --http-method GET --type AWS --uri c --debug
...
2015-10-28 01:25:07,764 - MainThread - botocore.endpoint - DEBUG - Setting apigateway timeout as (60, 60)
2015-10-28 01:25:07,764 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/awscli/clidriver.py", line 184, in main
    return command_table[parsed_args.command](remaining, parsed_args)
  File "/usr/local/lib/python2.7/site-packages/awscli/clidriver.py", line 369, in __call__
    return command_table[parsed_args.operation](remaining, parsed_globals)
  File "/usr/local/lib/python2.7/site-packages/awscli/clidriver.py", line 538, in __call__
    call_parameters, parsed_globals)
  File "/usr/local/lib/python2.7/site-packages/awscli/clidriver.py", line 662, in invoke
    **parameters)
  File "/usr/local/lib/python2.7/site-packages/botocore/client.py", line 310, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python2.7/site-packages/botocore/client.py", line 382, in _make_api_call
    api_params, operation_model)
  File "/usr/local/lib/python2.7/site-packages/botocore/client.py", line 423, in _convert_to_request_dict
    api_params, operation_model)
  File "/usr/local/lib/python2.7/site-packages/botocore/validate.py", line 275, in serialize_to_request
    operation_model)
  File "/usr/local/lib/python2.7/site-packages/botocore/serialize.py", line 404, in serialize_to_request
    partitioned['uri_path_kwargs'])
  File "/usr/local/lib/python2.7/site-packages/botocore/serialize.py", line 429, in _render_uri_template
    params[template_param])
KeyError: u'http_method'
2015-10-28 01:25:07,766 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255
@JordonPhillips
Copy link
Member

Interesting. Looks like http-method isn't being passed along correctly. Thanks for reporting, we'll take a look

@JordonPhillips JordonPhillips added the bug This issue is a bug. label Oct 27, 2015
@JordonPhillips JordonPhillips self-assigned this Oct 27, 2015
@JordonPhillips
Copy link
Member

It looks like this is a bug in our model for API Gateway, which is generated upstream. I'll update the ticket when a fix is in the pipes.

@bradmurray
Copy link

I am seeing the same problem. I can put a method, but then I am stuck putting an integration so I have to do that via the web.

@bradmurray
Copy link

Any update on this? I have a bunch of deployment stuff to do and right now my only option is to do a create-resource, put-method and put-method-response for each node and http-method, but then I have to go into the web interface to do all what should be covered in the put-integration call. That goes across a couple of different pages in the UI and I have to do it for all 4 http methods. This bug is the one thing between me and fully scripted goodness.

@JordonPhillips
Copy link
Member

We had a bug in our models that we get upstream, it will be fixed in the next release.

@bradmurray
Copy link

I installed the developer branch and the code that should be working is giving me the following error now:

A client error (BadRequestException) occurred when calling the PutIntegration operation: Enumeration value for HttpMethod must be non-empty

It think there is a typo somewhere in that "HttpMethod" should be "httpMethod" because that's the parameter that the CLI is expecting.

If have tried using the regular command-line method as well as the --cli-input-json format and the error is the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants