Skip to content

Commit 113c896

Browse files
authored
Update bucketname (#7310)
* Update bucketnames in Java, JavaScript, and Python examples
1 parent b524899 commit 113c896

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

javascriptv3/example_code/iam/actions/put-role-policy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const examplePolicyDocument = JSON.stringify({
1818
"s3:ListBucket",
1919
"s3:ListMultipartUploadParts",
2020
],
21-
Resource: "arn:aws:s3:::some-test-bucket",
21+
Resource: "arn:aws:s3:::amzn-s3-demo-bucket",
2222
},
2323
{
2424
Sid: "VisualEditor1",

javav2/example_code/iam/src/main/java/com/example/iam/IamPolicyBuilderExamples.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ public String specifyPrincipalsExample() {
209209
.effect(IamEffect.DENY)
210210
.addAction("s3:*")
211211
.addPrincipal(IamPrincipal.ALL)
212-
.addResource("arn:aws:s3:::BUCKETNAME/*")
213-
.addResource("arn:aws:s3:::BUCKETNAME")
212+
.addResource("arn:aws:s3:::amzn-s3-demo-bucket/*")
213+
.addResource("arn:aws:s3:::amzn-s3-demo-bucket")
214214
.addCondition(b1 -> b1
215215
.operator(IamConditionOperator.ARN_NOT_EQUALS)
216216
.key("aws:PrincipalArn")

python/example_code/iam/policy_wrapper.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def create_policy(name, description, actions, resource_arn):
3333
form of service:action, such as s3:PutObject.
3434
:param resource_arn: The Amazon Resource Name (ARN) of the resource this policy
3535
applies to. This ARN can contain wildcards, such as
36-
'arn:aws:s3:::my-bucket/*' to allow actions on all objects
37-
in the bucket named 'my-bucket'.
36+
'arn:aws:s3:::amzn-s3-demo-bucket/*' to allow actions on all objects
37+
in the bucket named 'amzn-s3-demo-bucket'.
3838
:return: The newly created policy.
3939
"""
4040
policy_doc = {
@@ -269,7 +269,7 @@ def usage_demo():
269269
"Policies let you define sets of permissions that can be attached to "
270270
"other IAM resources, like users and roles."
271271
)
272-
bucket_arn = f"arn:aws:s3:::made-up-bucket-name"
272+
bucket_arn = f"arn:aws:s3:::amzn-s3-demo-bucket"
273273
policy = create_policy(
274274
"demo-iam-policy",
275275
"Policy for IAM demonstration.",

0 commit comments

Comments
 (0)