-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Access Denied when calling the ListObjectsV2 #3594
Comments
Hi @chatofking - thanks for reaching out. From looking at the error, it looks like you might need to configure the IAM policy and make sure that you have the permission for Here's docs how to add permissions to IAM in general and here are instructions on adding ListBucket permission specifically. This is what the policy you need to add looks like:
Hope that helps and let me know if you have any other questions, |
how do I check which user I should attach I got many users out there. |
You could attach to your default user or the user you're actively configured to add the policy. Alternatively, you can add as many users as you have to an IAM group. Please see this guide: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-and-attach-iam-policy.html |
Describe the bug
here is s3_tutorial.py file
Expected Behavior
can get list objects in s3 bucket
Current Behavior
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied
Reproduction Steps
pip3 install boto3
create s3_tutorial.py file
Possible Solution
No response
Additional Information/Context
No response
SDK version used
Name: boto3 Version: 1.26.67 Summary: The AWS SDK for Python Home-page: https://github.com/boto/boto3 Author: Amazon Web Services Author-email: License: Apache License 2.0 Location: C:\Users\chat_\s3\s3-boto3-tutorial\Lib\site-packages Requires: botocore, jmespath, s3transfer Required-by:
Environment details (OS name and version, etc.)
windows 11
The text was updated successfully, but these errors were encountered: