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.

GetBucketPolicy with async S3 client doesn't work

See original GitHub issue

I’m trying to use the S3AsyncClient in order to get bucket policies from my AWS account. I created a client, giving it the correct credentials and region, but I keep getting null in the content of the response.

Just to be sure that I initialized the client correctly, I tried other requests like, getBucketPolicyStatus, listBuckets and more. Every other request I tried returned the expected data, except for getBucketPolicy… In that case the response body is always null, which then causes an XML parsing error (I debugged until I came to GetBucketPolicyInterceptor.modifyHttpResponseContent()).

NOTE: For Exactly the same request, the S3 sync client works like a charm.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
debora-itocommented, Jan 13, 2020

@avgdorom actually it is available in today’s release, version 2.10.48 - https://github.com/aws/aws-sdk-java-v2/blob/master/CHANGELOG.md#21048-2020-01-13

Apologies for the confusion.

1reaction
debora-itocommented, Jan 7, 2020

@avgdorom thank you for reporting this, we’ll investigate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get the policy for an Amazon S3 bucket using an AWS SDK
The following code examples show how to get the policy for an S3 bucket. C++. SDK for C++. Note. There's more on GitHub....
Read more >
S3AsyncClient (AWS SDK for Java - 2.18.35)
Service client for accessing Amazon S3 asynchronously. ... If you don't have GetBucketPolicy permissions, Amazon S3 returns a 403 Access Denied error.
Read more >
Write to S3 bucket using Async/Await in AWS Lambda
You only await functions that return a promise. s3.putObject does not return a promise (similar to most functions that take a callback).
Read more >
Java Client API Reference — MinIO Object Storage for Linux
HttpUrl object and optionally accepts port number and flag to enable secure (TLS) connection. Endpoint as a string can be formatted like below:...
Read more >
Examples of creating a bucket - EaseFilter
The create bucket request doesn't specify another AWS Region. The client sends a request to Amazon S3 to create the bucket in the...
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