Skip to content

Commit 63e93e5

Browse files
committed
Updating IaC code to be more resilient.
1 parent abc904e commit 63e93e5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ $ export JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION=true
4545
$ make
4646
$ source ./.env/bin/activate
4747

48-
$ cd ../infrastructure
48+
$ cd ./infrastructure
4949
$ npm install
5050

5151
# Or `export AWS_PROFILE=<YOUR_PROFILE_FROM_AWS_CLI>`

infrastructure/lib/shared-infrastructure.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export class InfrastructureSharedStack extends Stack {
1717
constructor (scope: Construct, id: string, props: StackProps) {
1818
super(scope, id, props);
1919

20+
const { account, region } = Stack.of(this);
21+
2022
// AWS CodeCommit Git repository shared across AWS Cloud9 instances.
2123

2224
this.repository = new Repository(this, "CodeRepository", {
@@ -35,7 +37,7 @@ export class InfrastructureSharedStack extends Stack {
3537
// Shared S3 Bucket for common data.
3638

3739
this.dataBucket = new Bucket(this, "DataBucket", {
38-
bucketName: `deploying-trurl-2-on-amazon-sagemaker-common-data-${Stack.of(this).region}`,
40+
bucketName: `deploying-trurl-2-on-sagemaker-data-${account}-${region}`,
3941
blockPublicAccess: BlockPublicAccess.BLOCK_ALL
4042
});
4143

0 commit comments

Comments
 (0)