Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion javascriptv3/example_code/iam/actions/put-role-policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const examplePolicyDocument = JSON.stringify({
"s3:ListBucket",
"s3:ListMultipartUploadParts",
],
Resource: "arn:aws:s3:::some-test-bucket",
Resource: "arn:aws:s3:::amzn-s3-demo-bucket",
},
{
Sid: "VisualEditor1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ public String specifyPrincipalsExample() {
.effect(IamEffect.DENY)
.addAction("s3:*")
.addPrincipal(IamPrincipal.ALL)
.addResource("arn:aws:s3:::BUCKETNAME/*")
.addResource("arn:aws:s3:::BUCKETNAME")
.addResource("arn:aws:s3:::amzn-s3-demo-bucket/*")
.addResource("arn:aws:s3:::amzn-s3-demo-bucket")
.addCondition(b1 -> b1
.operator(IamConditionOperator.ARN_NOT_EQUALS)
.key("aws:PrincipalArn")
Expand Down
6 changes: 3 additions & 3 deletions python/example_code/iam/policy_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def create_policy(name, description, actions, resource_arn):
form of service:action, such as s3:PutObject.
:param resource_arn: The Amazon Resource Name (ARN) of the resource this policy
applies to. This ARN can contain wildcards, such as
'arn:aws:s3:::my-bucket/*' to allow actions on all objects
in the bucket named 'my-bucket'.
'arn:aws:s3:::amzn-s3-demo-bucket/*' to allow actions on all objects
in the bucket named 'amzn-s3-demo-bucket'.
:return: The newly created policy.
"""
policy_doc = {
Expand Down Expand Up @@ -269,7 +269,7 @@ def usage_demo():
"Policies let you define sets of permissions that can be attached to "
"other IAM resources, like users and roles."
)
bucket_arn = f"arn:aws:s3:::made-up-bucket-name"
bucket_arn = f"arn:aws:s3:::amzn-s3-demo-bucket"
policy = create_policy(
"demo-iam-policy",
"Policy for IAM demonstration.",
Expand Down
Loading