Skip to content
This repository was archived by the owner on Jan 6, 2022. It is now read-only.
This repository was archived by the owner on Jan 6, 2022. It is now read-only.

S3 Handler crashes while trying to inspect S3 buckets in different regions #3

@thomas-lehmann

Description

@thomas-lehmann

Our S3 handler connects only to the local region and try to inspect S3 buckets on different regions.

2015-11-17T10:03:17 INFO Start handling s3.Bucket resources
Traceback (most recent call last):
File "./bootstrap.py", line 10, in <module>
exec(open(script_path, 'r').read())
File "<string>", line 45, in <module>
File "<string>", line 41, in run
File "src/main/python/monocyte/cli.py", line 76, in main
return monocyte.search_and_destroy_unwanted_resources()
File "src/main/python/monocyte/__init__.py", line 95, in search_and_destroy_unwanted_resources self.handle_service(specific_handler)
File "src/main/python/monocyte/__init__.py", line 111, in handle_service self.logger.warn(specific_handler.to_string(resource))
File "src/main/python/monocyte/handler/s3.py", line 59, in to_string len(resource.wrapped.get_all_keys()))
File "/home/ec2-user/aws-monocyte/venv/local/lib/python2.7/site-packages/boto/s3/bucket.py", line 472, in get_all_keys'', headers, **params)
File "/home/ec2-user/aws-monocyte/venv/local/lib/python2.7/site-packages/boto/s3/bucket.py", line 410, in _get_all response.status, response.reason, body)
boto.exception.S3ResponseError: S3ResponseError: 301 Moved Permanently

<?xml version="1.0" encoding="UTF-8"?> <Error><Code>PermanentRedirect</Code><Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message><Bucket>cf-templates-BUCKETNAME-us-west-2</Bucket><Endpoint>cf-templates-BUCKETID-us-west-2.s3.amazonaws.com</Endpoint><RequestId>XXXXXXXXXXXX</RequestId><HostId>tpz6Fja+d49XXXXXXXXXXXXXXXXXXXXXXXXXXXXo7zVenxeqeFCokI+W9N</HostId></Error>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions