Skip to content

Commit

Permalink
docs: update s3 bucket physical names to use amazon owned s3 buckets (#…
Browse files Browse the repository at this point in the history
…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*
  • Loading branch information
evzzk authored Oct 7, 2024
1 parent a8b2f01 commit 857bdc7
Show file tree
Hide file tree
Showing 31 changed files with 135 additions and 117 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7484,10 +7484,10 @@ const bucket = new s3.Bucket(this, 'L2Bucket');
const bucketResource = bucket.findChild('Resource') as s3.cloudformation.BucketResource;

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

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

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

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

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"Type": "AWS::ServiceDiscovery::Instance",
"Properties": {
"InstanceAttributes": {
"arn": "arn:aws:s3:::mybucket"
"arn": "arn:aws:s3:::amzn-s3-demo-bucket"
},
"InstanceId": "ervicediscoveryintegMyNamespaceNonIpServiceNonIpInstance45389A2A",
"ServiceId": {
"Fn::GetAtt": [
"MyNamespaceNonIpService3B425009",
"Id"
]
},
"InstanceId": "ervicediscoveryintegMyNamespaceNonIpServiceNonIpInstance45389A2A"
}
}
},
"MyNamespaceIpService220F547F": {
Expand All @@ -57,13 +57,13 @@
"AWS_INSTANCE_IPV4": "54.239.25.192",
"AWS_INSTANCE_PORT": "80"
},
"InstanceId": "awsservicediscoveryintegMyNamespaceIpServiceIpInstance56070746",
"ServiceId": {
"Fn::GetAtt": [
"MyNamespaceIpService220F547F",
"Id"
]
},
"InstanceId": "awsservicediscoveryintegMyNamespaceIpServiceIpInstance56070746"
}
}
}
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const service1 = namespace.createService('NonIpService', {
});

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

const service2 = namespace.createService('IpService', {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/app-staging-synthesizer-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class CustomStagingStack extends Stack implements IStagingResources {

public addFile(asset: FileAssetSource): FileStagingLocation {
return {
bucketName: 'myBucket',
bucketName: 'amzn-s3-demo-bucket',
assumeRoleArn: 'myArn',
dependencyStack: this,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codestar-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ new codestar.GitHubRepository(this, 'GitHubRepo', {
accessToken: SecretValue.secretsManager('my-github-token', {
jsonField: 'token',
}),
contentsBucket: s3.Bucket.fromBucketName(this, 'Bucket', 'bucket-name'),
contentsBucket: s3.Bucket.fromBucketName(this, 'Bucket', 'amzn-s3-demo-bucket'),
contentsKey: 'import.zip',
});
```
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-redshift-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as s3 from 'aws-cdk-lib/aws-s3';

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

const cluster = new Cluster(this, 'Redshift', {
masterUser: {
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/integ-tests-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,11 @@ need to do is add a dependency between the calls. There is an helper method `nex
declare const integ: IntegTest;

integ.assertions.awsApiCall('S3', 'putObject', {
Bucket: 'my-bucket',
Bucket: 'amzn-s3-demo-bucket',
Key: 'my-key',
Body: 'helloWorld',
}).next(integ.assertions.awsApiCall('S3', 'getObject', {
Bucket: 'my-bucket',
Bucket: 'amzn-s3-demo-bucket',
Key: 'my-key',
}));
```
Expand Down
6 changes: 3 additions & 3 deletions packages/aws-cdk-lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ a stack with a synthesizer, pass it as one of its properties:
```ts
new MyStack(app, 'MyStack', {
synthesizer: new DefaultStackSynthesizer({
fileAssetsBucketName: 'my-orgs-asset-bucket',
fileAssetsBucketName: 'amzn-s3-demo-bucket',
}),
});
```
Expand Down Expand Up @@ -1173,7 +1173,7 @@ The `CfnResource` class allows emitting arbitrary entries in the
new CfnResource(this, 'ResourceId', {
type: 'AWS::S3::Bucket',
properties: {
BucketName: 'bucket-name'
BucketName: 'amzn-s3-demo-bucket'
},
});
```
Expand All @@ -1197,7 +1197,7 @@ new CfnInclude(this, 'ID', {
Bucket: {
Type: 'AWS::S3::Bucket',
Properties: {
BucketName: 'my-shiny-bucket'
BucketName: 'amzn-s3-demo-bucket'
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/aws-cloudfront/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1124,15 +1124,15 @@ new cloudfront.CloudFrontWebDistribution(this, 'ADistribution', {
originConfigs: [
{
s3OriginSource: {
s3BucketSource: s3.Bucket.fromBucketName(this, 'aBucket', 'myoriginbucket'),
s3BucketSource: s3.Bucket.fromBucketName(this, 'aBucket', 'amzn-s3-demo-bucket'),
originPath: '/',
originHeaders: {
'myHeader': '42',
},
originShieldRegion: 'us-west-2',
},
failoverS3OriginSource: {
s3BucketSource: s3.Bucket.fromBucketName(this, 'aBucketFallback', 'myoriginbucketfallback'),
s3BucketSource: s3.Bucket.fromBucketName(this, 'aBucketFallback', 'amzn-s3-demo-bucket1'),
originPath: '/somewhere',
originHeaders: {
'myHeader2': '21',
Expand Down
Loading

0 comments on commit 857bdc7

Please sign in to comment.