-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
While using s3.get_public_access_block(Bucket=bucket_name) in AWS lambda NoSuchPublicAccessBlockConfiguration error comes up #3627
Comments
Hi @aditisri07 - thanks for reaching out. Public access is not enabled by default on initial bucket creation and can be updated via AWS Console under your bucket permission settings. Please see screenshot below for reference. Hope it helps, |
Hey @aBurmeseDev , We have set the block all public access for the said bucket to off. It is a public bucket already. |
facing same issue |
Was facing the same issue. This can happen if someone manually deleted the
When you delete the public access block, from the aws console, the options look the same as if setting all the options to false. |
@hsiam261 - kudos to you for sharing it with others. If anyone's come across this, please refer to the commend above. Closing it for now. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
The error:
An error occurred (NoSuchPublicAccessBlockConfiguration) when calling the GetPublicAccessBlock operation: The public access block configuration was not found.
Observation: The command seems to be working fine when the buckets are not public and the error is received when it is public.
Version of boto3 used: 1.20.32
Version of botocore used: 1.23.32
Expected Behavior
Expected it to return the response in following format
{
'PublicAccessBlockConfiguration': {
'BlockPublicAcls': True|False,
'IgnorePublicAcls': True|False,
'BlockPublicPolicy': True|False,
'RestrictPublicBuckets': True|False
}
}
Current Behavior
throwing the following error:
An error occurred (NoSuchPublicAccessBlockConfiguration) when calling the GetPublicAccessBlock operation: The public access block configuration was not found.
when a public bucket is passed in its parameter
Reproduction Steps
public_access_block_response = s3.get_public_access_block(Bucket='bucket_name')
where bucket_name is public
Possible Solution
No response
Additional Information/Context
No response
SDK version used
Python 3.9
Environment details (OS name and version, etc.)
AWS lambda
The text was updated successfully, but these errors were encountered: