question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

s3 client. list_bucket_metrics_configurations() does not return documented response

See original GitHub issue

Hi there. So I’m doing (approximately)

session = boto3.Session(profile_name=opts_dict['profile'],region_name=opts_dict['region'])
s3_client = session.client('s3')
res = s3_client.list_buckets()
for b in res['Buckets']:
	bn = b['Name']
	print("---------------------------------------")
	print(bn)
	res = s3_client.list_bucket_metrics_configurations(Bucket=bn)
	print(res)

and for all 14 buckets in my account, I get a response that looks like this:

{'ResponseMetadata': {'RequestId': '047D2D7A74F939C6', 'HostId': 'ka0BBTFI7G1mIMZutxKIyAxpgVkDA0viv3yajzwi09valCoLXdwK9hZxqlJhKSVvIfgl7yU01jA=', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amz-id-2': 'ka0BBTFI7G1mIMZutxKIyAxpgVkDA0viv3yajzwi09valCoLXdwK9hZxqlJhKSVvIfgl7yU01jA=', 'x-amz-request-id': '047D2D7A74F939C6', 'date': 'Thu, 09 Nov 2017 14:33:44 GMT', 'content-length': '185', 'server': 'AmazonS3'}, 'RetryAttempts': 0}, 'IsTruncated': False}

I’m expecting an element called ‘MetricsConfigurationList’ in that dict, per this documentation: http://boto3.readthedocs.io/en/latest/reference/services/s3.html#S3.Client.list_bucket_metrics_configurations but it’s not there.

Is this an error in the documentation, boto3 itself, or in my understanding of how list_bucket_metrics_configurations() is supposed to work?

Edit:

boto3 version: 1.4.4 botocore version: 1.7.43 OS: Sierra 10.12.6

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
joguSDcommented, Nov 9, 2017

It’s possible that the version of boto3/botocore you have doesn’t know about this field. Try updating boto3 and see if the field is present. If updating doesn’t work providing debug logs by calling boto3.set_stream_logger('') would be helpful.

0reactions
jonathanwcranecommented, Nov 20, 2017

We should probably document this in a single location, but then people wouldn’t find it if they go to the docs for a single API method.

You can kind of work around that but adding a “the usual caveats apply” kind of link to the documentation of each function. Then you a) have it in one place and b) at least have a pointer to that location from every place where people would conceivably find it useful.

It’s more automatable than having to templatize a statement like “the {{X}} element may be omitted from the response if there is no data on {{X}} available.”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Responses - Amazon Simple Storage Service
Error Code Description HTTP Status Code AccessControlListNotSupported The bucket does not allow ACLs. 400 Bad Request AccessDenied Access Denied 403 Forbidden BucketAlreadyOwnedByYou 409 Conflict (in all...
Read more >
S3 — Boto3 Docs 1.26.34 documentation - AWS
If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied). Return type....
Read more >
s3 - Go Packages
With that client you can make API requests to the service. These clients are safe to use concurrently. See the SDK's documentation for...
Read more >
Dell EMC PowerScale: OneFS S3 API Guide
If not specified, all unsupported request parameters and the request body are silently ignored by OneFS without an error code being returned to...
Read more >
Client in aws_sdk_s3::client - Rust - Docs.rs
Client for Amazon Simple Storage Service. ... outpostID.s3-outposts. ... Does not return the access point ARN or access point alias if used.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found