Guest User

Untitled

a guest
Oct 23rd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. # IAM policy recipes
  2. - [Public Read Write access](#public-read-write)
  3. - [Public Read Only access](#public-read-only)
  4. - [Public Write Only access](#public-write-only)
  5.  
  6. ## Public Read Write
  7. **Type:** bucket
  8.  
  9. ```json
  10. {
  11. "Version": "2012-10-17",
  12. "Statement": [
  13. {
  14. "Action": [
  15. "s3:GetBucketLocation",
  16. "s3:ListBucket",
  17. "s3:ListBucketMultipartUploads"
  18. ],
  19. "Effect": "Allow",
  20. "Resource": [
  21. "arn:aws:s3:::YOUR-BUCKET"
  22. ],
  23. "Sid": ""
  24. },
  25. {
  26. "Action": [
  27. "s3:AbortMultipartUpload",
  28. "s3:DeleteObject",
  29. "s3:GetObject",
  30. "s3:ListMultipartUploadParts",
  31. "s3:PutObject"
  32. ],
  33. "Effect": "Allow",
  34. "Resource": [
  35. "arn:aws:s3:::YOUR-BUCKET/*"
  36. ],
  37. "Sid": ""
  38. }
  39. ]
  40. }
  41. ```
  42.  
  43. ## Public Read Only
  44. **Type:** bucket
  45.  
  46. ```json
  47. {
  48. "Version": "2012-10-17",
  49. "Statement": [
  50. {
  51. "Action": [
  52. "s3:GetBucketLocation",
  53. "s3:ListBucket"
  54. ],
  55. "Effect": "Allow",
  56. "Resource": [
  57. "arn:aws:s3:::YOUR-BUCKET"
  58. ],
  59. "Sid": ""
  60. },
  61. {
  62. "Action": [
  63. "s3:GetObject"
  64. ],
  65. "Effect": "Allow",
  66. "Resource": [
  67. "arn:aws:s3:::YOUR-BUCKET/*"
  68. ],
  69. "Sid": ""
  70. }
  71. ]
  72. }
  73. ```
  74.  
  75. ## Public Write Only
  76. **Type:** bucket
  77.  
  78. ```json
  79. {
  80. "Version": "2012-10-17",
  81. "Statement": [
  82. {
  83. "Action": [
  84. "s3:GetBucketLocation",
  85. "s3:ListBucketMultipartUploads"
  86. ],
  87. "Effect": "Allow",
  88. "Resource": [
  89. "arn:aws:s3:::YOUR-BUCKET"
  90. ],
  91. "Sid": ""
  92. },
  93. {
  94. "Action": [
  95. "s3:AbortMultipartUpload",
  96. "s3:DeleteObject",
  97. "s3:ListMultipartUploadParts",
  98. "s3:PutObject"
  99. ],
  100. "Effect": "Allow",
  101. "Resource": [
  102. "arn:aws:s3:::YOUR-BUCKET/*"
  103. ],
  104. "Sid": ""
  105. }
  106. ]
  107. }
  108. ```
Add Comment
Please, Sign In to add comment