Skip to content

config_enable handles create_bucket response incorrectly #62

Description

@srjturner

When the config_enable bot creates the Config bucket it uses the S3 ServiceResource's create_bucket() method:

result = s3_resource.create_bucket(...)

It then refers to that result as if it were a call the the S3 Client's create_bucket() method:

responseCode = result['ResponseMetadata']['HTTPStatusCode']

This is invalid, as the S3 Resource returns an instance of s3.Bucket, not a dict, so it throws a ClientError: TypeError: 's3.Bucket ' object is not subscriptable.

In fact it does not need to check the result since we already know that the create_bucket() must have succeeded if the execution reaches that line.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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