-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting s3 public access block configuration fails when all options are false #819
Comments
A workaround is to use the client
.delete_public_access_block()
.bucket(bucket)
.send()
.await?; |
@RobbieClarken thanks for submitting such a well-written issue report. I've seen similar failures with S3 APIs that have funky handling of default values. S3 seems to often treat To whomever is tasked with fixing this:
|
This issue occurs because the S3 model incorrectly marks these fields as required when they are optional. We need to either wait for the updated S3 model or add a customization on our side to automatically apply the |
Sorry for the delay. This issue should be fixed in v0.38 |
Testing this in the latest version and it now work without any errors. Closing this issue |
|
Describe the bug
When using the S3
put_public_access_block
method, if all four options options are set tofalse
the request will fail. For example:If at least one of four
PublicAccessBlockConfiguration
options is set totrue
then the request will succeed.Expected Behavior
Running the code above should not produce any errors and result in these options all being disabled for the S3 bucket:
Current Behavior
The code above produces an error:
Reproduction Steps
Run the code above (after changing
bucket
to an unused S3 bucket name).Possible Solution
I believe the problem is due to the
ser_public_access_block_configuration
function havingif
conditions which skips serializing the options that arefalse
. This function should probably just output the options irrespective of whether they aretrue
orfalse
.Additional Information/Context
To confirm it is valid to make a request where all 4 options are
false
you can run the following aws-cli command:aws s3api put-public-access-block --bucket CHANGE_ME --public-access-block-configuration 'BlockPublicAcls=false,IgnorePublicAcls=false,BlockPublicPolicy=false,RestrictPublicBuckets=false'
Version
The text was updated successfully, but these errors were encountered: