diff --git a/javascriptv3/example_code/iam/actions/put-role-policy.js b/javascriptv3/example_code/iam/actions/put-role-policy.js index fecfb960e86..ffa960a657f 100644 --- a/javascriptv3/example_code/iam/actions/put-role-policy.js +++ b/javascriptv3/example_code/iam/actions/put-role-policy.js @@ -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", diff --git a/javav2/example_code/iam/src/main/java/com/example/iam/IamPolicyBuilderExamples.java b/javav2/example_code/iam/src/main/java/com/example/iam/IamPolicyBuilderExamples.java index dca35ac34aa..e216bb5d396 100644 --- a/javav2/example_code/iam/src/main/java/com/example/iam/IamPolicyBuilderExamples.java +++ b/javav2/example_code/iam/src/main/java/com/example/iam/IamPolicyBuilderExamples.java @@ -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") diff --git a/python/example_code/iam/policy_wrapper.py b/python/example_code/iam/policy_wrapper.py index 78bb38f76d1..d258ee8286d 100644 --- a/python/example_code/iam/policy_wrapper.py +++ b/python/example_code/iam/policy_wrapper.py @@ -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 = { @@ -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.",