Ask Your Question
0

How to use boto with cloudwatch formation?

asked 2014-03-10 17:00:53 -0600

David Hill gravatar image

When trying to use boto and heat (2013.2.2), we get the following error messages:

2014-03-10 21:40:42.171 14982 DEBUG heat.api.middleware.version_negotiation [-] Processing request: GET /cloudformation/v1/ Accept:  process_request /usr/lib/python2.7/dist-packages/heat/api/middleware/version_negotiation.py:52
2014-03-10 21:40:42.172 14982 DEBUG heat.api.middleware.version_negotiation [-] Matched versioned URI. Version: 1.0 process_request /usr/lib/python2.7/dist-packages/heat/api/middleware/version_negotiation.py:67
2014-03-10 21:40:42.172 14982 INFO heat.api.aws.ec2token [-] Checking AWS credentials..
2014-03-10 21:40:42.173 14982 INFO heat.api.aws.ec2token [-] AWS credentials found, checking against keystone.
2014-03-10 21:40:42.174 14982 INFO heat.api.aws.ec2token [-] Authenticating with http://10.148.191.253:5000/v2.0/ec2tokens
2014-03-10 21:40:42.175 14982 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 10.148.191.253
2014-03-10 21:40:42.191 14982 DEBUG urllib3.connectionpool [-] "POST /v2.0/ec2tokens HTTP/1.1" 500 None _make_request /usr/lib/python2.7/dist-packages/urllib3/connectionpool.py:296
2014-03-10 21:40:42.192 14982 INFO heat.api.aws.ec2token [-] AWS authentication failure.
2014-03-10 21:40:42.193 14982 DEBUG root [-] XML response : <ErrorResponse><Error><Message>User is not authorized to perform action</Message><Code>AccessDenied</Code><Type>Sender</Type></Error></ErrorResponse> to_xml /usr/lib/python2.7/dist-packages/heat/common/wsgi.py:604

We tried with the following boto versions 2.5.2, 2.9.6 and 2.26.1 and none of them worked.

code snippet using boto:

import sys
ENDPOINT='somehwere'
REGION='none'
AWS_ACCESS_KEY='some_access_key'
AWS_SECRET_ACCESS_KEY='some_secret_access_key'
AWS_PORT=443

from boto.regioninfo import RegionInfo
reg = RegionInfo(endpoint=ENDPOINT)

from boto.cloudformation import CloudFormationConnection
# FIXME: The 'port' and 'path' should be stored in config file...
conn = CloudFormationConnection(aws_access_key_id=AWS_ACCESS_KEY,
                    aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
                    is_secure=True,
                    region=reg,
                    port=AWS_PORT,
                    debug=1,
                    path='/cloudformation/v1')
print conn.list_stacks()

Are we missing something?

Thank you very much!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-09-29 01:06:11 -0600

asalkeld gravatar image

Hi

Try looking at how we do it in the cfntools: https://github.com/openstack/heat-cfn...

I see the path is different to what you are using.

-Angus

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-03-10 17:00:53 -0600

Seen: 238 times

Last updated: Sep 29 '14