Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. from s3fs.core import S3FileSystem
  2.  
  3. client_kwargs={"aws_access_key_id": "blah", "aws_secret_access_key": "blah2"}
  4. conn = S3FileSystem(client_kwargs=client_kwargs)
  5. conn.exists(path="my_path")
  6.  
  7. botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied
  8.  
  9. {
  10. "Id": "Policy1566429314117",
  11. "Version": "2012-10-17",
  12. "Statement": [
  13. {
  14. "Sid": "Stmt1566429308194",
  15. "Action": [
  16. "s3:ListBucket"
  17. ],
  18. "Effect": "Allow",
  19. "Resource": "arn:aws:s3:::myBucket",
  20. "Principal": {
  21. "AWS": [
  22. "arn:aws:iam::111549047503:user/myUser"
  23. ]
  24. }
  25. }
  26. ]
  27. }
  28.  
  29. {
  30. "Version": "2012-10-17",
  31. "Statement": [
  32. {
  33. "Sid": "Stmt1566429639314",
  34. "Action": [
  35. "s3:ListBucket"
  36. ],
  37. "Effect": "Allow",
  38. "Resource": "arn:aws:s3:::myBucket"
  39. }
  40. ]
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement