Skip to content

Commit 857bdc7

Browse files
authoredOct 7, 2024··
docs: update s3 bucket physical names to use amazon owned s3 buckets (#31576)
### Issue # (if applicable) Closes #<issue number here>. ### Reason for this change By using Amazon owned s3 bucket physical names, we remove the possibility of documenting customer owned buckets in our examples. ### Description of changes Change physical S3 bucket names such as `my-bucket` to Amazon owned ones such as `amzn-s3-demo-bucket`. ### Description of how you validated changes ### Checklist - [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent a8b2f01 commit 857bdc7

File tree

31 files changed

+135
-117
lines changed

31 files changed

+135
-117
lines changed
 

‎CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7484,10 +7484,10 @@ const bucket = new s3.Bucket(this, 'L2Bucket');
74847484
const bucketResource = bucket.findChild('Resource') as s3.cloudformation.BucketResource;
74857485

74867486
// strongly-typed overrides
7487-
bucketResource.propertyOverrides.bucketName = 'NewBucketName';
7487+
bucketResource.propertyOverrides.bucketName = 'amzn-s3-demo-bucket';
74887488

74897489
// weakly-typed overrides
7490-
bucketResource.addPropertyOverride('BucketName', 'NewerBucketName');
7490+
bucketResource.addPropertyOverride('BucketName', 'amzn-s3-demo-bucket1');
74917491
```
74927492

74937493
### Bug Fixes
@@ -8289,7 +8289,7 @@ new Pipeline(this, 'MyCoolPipeline', { artifactsBucket: bucket });
82898289
You can also import a bucket by just specifying its name:
82908290

82918291
```typescript
8292-
const bucket = Bucket.import({ bucketName: new BucketName('my-bucket') });
8292+
const bucket = Bucket.import({ bucketName: new BucketName('amzn-s3-demo-bucket') });
82938293
new Pipeline(this, 'MyCoolPipeline', { artifactsBucket: bucket });
82948294
```
82958295

‎packages/@aws-cdk-testing/framework-integ/test/aws-servicediscovery/test/integ.service-with-http-namespace.lit.js.snapshot/aws-servicediscovery-integ.assets.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/@aws-cdk-testing/framework-integ/test/aws-servicediscovery/test/integ.service-with-http-namespace.lit.js.snapshot/aws-servicediscovery-integ.template.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
"Type": "AWS::ServiceDiscovery::Instance",
2323
"Properties": {
2424
"InstanceAttributes": {
25-
"arn": "arn:aws:s3:::mybucket"
25+
"arn": "arn:aws:s3:::amzn-s3-demo-bucket"
2626
},
27+
"InstanceId": "ervicediscoveryintegMyNamespaceNonIpServiceNonIpInstance45389A2A",
2728
"ServiceId": {
2829
"Fn::GetAtt": [
2930
"MyNamespaceNonIpService3B425009",
3031
"Id"
3132
]
32-
},
33-
"InstanceId": "ervicediscoveryintegMyNamespaceNonIpServiceNonIpInstance45389A2A"
33+
}
3434
}
3535
},
3636
"MyNamespaceIpService220F547F": {
@@ -57,13 +57,13 @@
5757
"AWS_INSTANCE_IPV4": "54.239.25.192",
5858
"AWS_INSTANCE_PORT": "80"
5959
},
60+
"InstanceId": "awsservicediscoveryintegMyNamespaceIpServiceIpInstance56070746",
6061
"ServiceId": {
6162
"Fn::GetAtt": [
6263
"MyNamespaceIpService220F547F",
6364
"Id"
6465
]
65-
},
66-
"InstanceId": "awsservicediscoveryintegMyNamespaceIpServiceIpInstance56070746"
66+
}
6767
}
6868
}
6969
},

‎packages/@aws-cdk-testing/framework-integ/test/aws-servicediscovery/test/integ.service-with-http-namespace.lit.js.snapshot/cdk.out

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/@aws-cdk-testing/framework-integ/test/aws-servicediscovery/test/integ.service-with-http-namespace.lit.js.snapshot/integ.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/@aws-cdk-testing/framework-integ/test/aws-servicediscovery/test/integ.service-with-http-namespace.lit.js.snapshot/manifest.json

+10-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/@aws-cdk-testing/framework-integ/test/aws-servicediscovery/test/integ.service-with-http-namespace.lit.js.snapshot/tree.json

+42-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/@aws-cdk-testing/framework-integ/test/aws-servicediscovery/test/integ.service-with-http-namespace.lit.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const service1 = namespace.createService('NonIpService', {
1313
});
1414

1515
service1.registerNonIpInstance('NonIpInstance', {
16-
customAttributes: { arn: 'arn:aws:s3:::mybucket' },
16+
customAttributes: { arn: 'arn:aws:s3:::amzn-s3-demo-bucket' },
1717
});
1818

1919
const service2 = namespace.createService('IpService', {

‎packages/@aws-cdk/app-staging-synthesizer-alpha/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ class CustomStagingStack extends Stack implements IStagingResources {
336336

337337
public addFile(asset: FileAssetSource): FileStagingLocation {
338338
return {
339-
bucketName: 'myBucket',
339+
bucketName: 'amzn-s3-demo-bucket',
340340
assumeRoleArn: 'myArn',
341341
dependencyStack: this,
342342
};

‎packages/@aws-cdk/aws-codestar-alpha/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ new codestar.GitHubRepository(this, 'GitHubRepo', {
2929
accessToken: SecretValue.secretsManager('my-github-token', {
3030
jsonField: 'token',
3131
}),
32-
contentsBucket: s3.Bucket.fromBucketName(this, 'Bucket', 'bucket-name'),
32+
contentsBucket: s3.Bucket.fromBucketName(this, 'Bucket', 'amzn-s3-demo-bucket'),
3333
contentsKey: 'import.zip',
3434
});
3535
```

‎packages/@aws-cdk/aws-redshift-alpha/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import * as ec2 from 'aws-cdk-lib/aws-ec2';
6262
import * as s3 from 'aws-cdk-lib/aws-s3';
6363

6464
const vpc = new ec2.Vpc(this, 'Vpc');
65-
const bucket = s3.Bucket.fromBucketName(this, 'bucket', 'logging-bucket');
65+
const bucket = s3.Bucket.fromBucketName(this, 'bucket', 'amzn-s3-demo-bucket');
6666

6767
const cluster = new Cluster(this, 'Redshift', {
6868
masterUser: {

‎packages/@aws-cdk/integ-tests-alpha/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,11 @@ need to do is add a dependency between the calls. There is an helper method `nex
500500
declare const integ: IntegTest;
501501

502502
integ.assertions.awsApiCall('S3', 'putObject', {
503-
Bucket: 'my-bucket',
503+
Bucket: 'amzn-s3-demo-bucket',
504504
Key: 'my-key',
505505
Body: 'helloWorld',
506506
}).next(integ.assertions.awsApiCall('S3', 'getObject', {
507-
Bucket: 'my-bucket',
507+
Bucket: 'amzn-s3-demo-bucket',
508508
Key: 'my-key',
509509
}));
510510
```

‎packages/aws-cdk-lib/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ a stack with a synthesizer, pass it as one of its properties:
147147
```ts
148148
new MyStack(app, 'MyStack', {
149149
synthesizer: new DefaultStackSynthesizer({
150-
fileAssetsBucketName: 'my-orgs-asset-bucket',
150+
fileAssetsBucketName: 'amzn-s3-demo-bucket',
151151
}),
152152
});
153153
```
@@ -1173,7 +1173,7 @@ The `CfnResource` class allows emitting arbitrary entries in the
11731173
new CfnResource(this, 'ResourceId', {
11741174
type: 'AWS::S3::Bucket',
11751175
properties: {
1176-
BucketName: 'bucket-name'
1176+
BucketName: 'amzn-s3-demo-bucket'
11771177
},
11781178
});
11791179
```
@@ -1197,7 +1197,7 @@ new CfnInclude(this, 'ID', {
11971197
Bucket: {
11981198
Type: 'AWS::S3::Bucket',
11991199
Properties: {
1200-
BucketName: 'my-shiny-bucket'
1200+
BucketName: 'amzn-s3-demo-bucket'
12011201
}
12021202
}
12031203
}

‎packages/aws-cdk-lib/aws-cloudfront/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1124,15 +1124,15 @@ new cloudfront.CloudFrontWebDistribution(this, 'ADistribution', {
11241124
originConfigs: [
11251125
{
11261126
s3OriginSource: {
1127-
s3BucketSource: s3.Bucket.fromBucketName(this, 'aBucket', 'myoriginbucket'),
1127+
s3BucketSource: s3.Bucket.fromBucketName(this, 'aBucket', 'amzn-s3-demo-bucket'),
11281128
originPath: '/',
11291129
originHeaders: {
11301130
'myHeader': '42',
11311131
},
11321132
originShieldRegion: 'us-west-2',
11331133
},
11341134
failoverS3OriginSource: {
1135-
s3BucketSource: s3.Bucket.fromBucketName(this, 'aBucketFallback', 'myoriginbucketfallback'),
1135+
s3BucketSource: s3.Bucket.fromBucketName(this, 'aBucketFallback', 'amzn-s3-demo-bucket1'),
11361136
originPath: '/somewhere',
11371137
originHeaders: {
11381138
'myHeader2': '21',

0 commit comments

Comments
 (0)
Please sign in to comment.