Skip to content

Commit

Permalink
set CDK_DEFAULT_REGION env variable with aws configure command
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmin23 committed Sep 13, 2024
1 parent 470b6c8 commit fe72218
Show file tree
Hide file tree
Showing 84 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion api-gateway/cognito-api-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

```
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
```

Expand Down
2 changes: 1 addition & 1 deletion api-gateway/dynamodb-cognito/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

```
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
```

Expand Down
2 changes: 1 addition & 1 deletion api-gateway/dynamodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

```
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
```

Expand Down
2 changes: 1 addition & 1 deletion api-gateway/http-dynamodb-crud-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ At this point you can now synthesize the CloudFormation template for this code.

```
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
```

Expand Down
2 changes: 1 addition & 1 deletion api-gateway/logging-api-calls-to-cloudwatch-logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth -c firehose_name=<i>{your-delivery-stream-name}</i> --all
</pre>

Expand Down
2 changes: 1 addition & 1 deletion api-gateway/logging-api-calls-to-firehose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth -c firehose_name=amazon-apigateway-<i>{your-delivery-stream-name}</i>
</pre>

Expand Down
2 changes: 1 addition & 1 deletion athena/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --parameters AthenaWorkGroupName='<i>your-athena-work-group-name</i>'
</pre>

Expand Down
2 changes: 1 addition & 1 deletion bedrock/cfn/opensearch-serverless/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Now this point you can now synthesize the CloudFormation template for this code.

```
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
```

Expand Down
2 changes: 1 addition & 1 deletion bedrock/generative-ai-cdk-constructs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth
</pre>

Expand Down
2 changes: 1 addition & 1 deletion cloud9/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth \
-c Cloud9OwnerName='<i>cloud9-owner-name</i>'
</pre>
Expand Down
2 changes: 1 addition & 1 deletion cloudfront/static-site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth \
--parameters S3BucketForStaticContents='<i>your-s3-bucket-for-static-contents</i>'
</pre>
Expand Down
2 changes: 1 addition & 1 deletion custom-resources/sagemaker-jumstart-model-deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Now you are ready to synthesize the CloudFormation template for this code.

```
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
```

Expand Down
2 changes: 1 addition & 1 deletion dms-serverless/aurora_mysql-to-kinesis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all \
-c source_database_secret_name='<i>secret-full-name</i>' \
-c mysql_client_security_group_name='<i>mysql-client-security-group-name</i>' \
Expand Down
2 changes: 1 addition & 1 deletion dms-serverless/aurora_mysql-to-s3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all \
-c source_database_secret_name='<i>secret-full-name</i>' \
-c mysql_client_security_group_name='<i>mysql-client-security-group-name</i>' \
Expand Down
2 changes: 1 addition & 1 deletion dms/aurora_mysql-to-kinesis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all \
-c source_database_secret_name='<i>secret-full-name</i>' \
-c mysql_client_security_group_name='<i>mysql-client-security-group-name</i>' \
Expand Down
2 changes: 1 addition & 1 deletion dms/aurora_mysql-to-s3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all \
-c source_database_secret_name='<i>secret-full-name</i>' \
-c mysql_client_security_group_name='<i>mysql-client-security-group-name</i>' \
Expand Down
2 changes: 1 addition & 1 deletion documentdb-elastic-clusters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth -c docdb_cluster_name='<i>cluster-name</i>' \
-c docdb_cluster_secret_name='<i>docdb-secret-name</i>'
</pre>
Expand Down
2 changes: 1 addition & 1 deletion documentdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ At this point you can now synthesize the CloudFormation template for this code.

```
$ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
$ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
$ export CDK_DEFAULT_REGION=$(aws configure get region)
$ cdk synth --all
```

Expand Down
2 changes: 1 addition & 1 deletion ec2/ec2-with-pem-key/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To import an existing VPC, you should specify the following environment variable

```
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
```

If you pass context variable such as `vcp_name=<your vpc name>` (e.g. `vpc_name='[X]default'`), you can use the existing VPC.
Expand Down
2 changes: 1 addition & 1 deletion ec2/import-existing-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To import an existing VPC, you should specify the following environment variable

```
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
```

If you pass context variable such as `vcp_name=<your vpc name>` (e.g. `vpc_name='default'`), you can use the existing VPC.
Expand Down
2 changes: 1 addition & 1 deletion ec2/jenkins-on-ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To import an existing VPC, you should specify the following environment variable

```
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
```

If you pass context variable such as `vcp_name=<your vpc name>` (e.g. `vpc_name='default'`), you can use the existing VPC.
Expand Down
2 changes: 1 addition & 1 deletion ec2/vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ To use more than 2 AZs, be sure to specify the account and region on your stack.
(.venv) $ aws configure cdk_user get region
us-east-2
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
```

After setting enviroment variables such as `CDK_DEFAULT_ACCOUNT`, `CDK_DEFAULT_REGION`,
Expand Down
2 changes: 1 addition & 1 deletion ecr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ At this point you can now synthesize the CloudFormation template for this code.

```
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth
```

Expand Down
2 changes: 1 addition & 1 deletion glue/cdc-parquet-to-apache-iceberg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth
</pre>

Expand Down
2 changes: 1 addition & 1 deletion glue/cdc-streams-to-apache-iceberg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
</pre>

Expand Down
2 changes: 1 addition & 1 deletion glue/streaming-etl/kafka-to-iceberg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
</pre>

Expand Down
2 changes: 1 addition & 1 deletion glue/streaming-etl/msk-serverless-to-iceberg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
</pre>

Expand Down
4 changes: 2 additions & 2 deletions glue/streaming-etl/sink-to-deltalake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
</pre>

Expand Down Expand Up @@ -153,7 +153,7 @@ command.
| product_id | string | "00001" |
| product_name | string | "Volkswagen Golf" |
| price | int | 10370 |
| category | string | "Volkswagen" |
| category | string | "Volkswagen" |
| updated_at | string | "2023-06-13 07:24:26" |

(11) Choose **Finish**
Expand Down
2 changes: 1 addition & 1 deletion glue/streaming-etl/sink-to-hudi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
</pre>

Expand Down
2 changes: 1 addition & 1 deletion glue/streaming-etl/sink-to-iceberg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
</pre>

Expand Down
2 changes: 1 addition & 1 deletion glue/streaming-etl/sink-to-s3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
</pre>

Expand Down
2 changes: 1 addition & 1 deletion kendra/webcrawler-datasource/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ At this point you can now synthesize the CloudFormation template for this code.

```
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all
```

Expand Down
2 changes: 1 addition & 1 deletion kinesis-data-analytics/kda-flink/msk-replication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ At this point you can now synthesize the CloudFormation template for this code.

```
$ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
$ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
$ export CDK_DEFAULT_REGION=$(aws configure get region)
$ cdk synth
```

Expand Down
4 changes: 2 additions & 2 deletions kinesis-data-firehose/data-transform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Now you are ready to synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all \
--parameters FirehoseStreamName=<i>'your-delivery-stream-name'</i> \
--parameters FirehosePrefix=<i>'your-s3-bucket-prefix'</i>
Expand All @@ -83,7 +83,7 @@ For example,

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all \
--parameters FirehoseStreamName='PUT-S3-DataTransform' \
--parameters FirehosePrefix='json-data/year=!{timestamp:yyyy}/month=!{timestamp:MM}/day=!{timestamp:dd}/hour=!{timestamp:HH}/'
Expand Down
4 changes: 2 additions & 2 deletions kinesis-data-firehose/dynamic-partitioning/inline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth \
--parameters FirehoseStreamName=<i>'your-delivery-stream-name'</i> \
--parameters FirehoseDynamicPartitionKeys=<i>'your-jq-expressions-to-parse-dynamic-partition-keys'</i> \
Expand Down Expand Up @@ -83,7 +83,7 @@ Now you can create kinesis data firehose with the above mapping of parameters to

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth \
--parameters FirehoseStreamName='PUT-S3-inline' \
--parameters FirehoseDynamicPartitionKeys='{region:.region,device:.type.device,year:.event_timestamp|strftime("%Y"),month:.event_timestamp|strftime("%m"),day:.event_timestamp|strftime("%d"),hour:.event_timestamp|strftime("%H")}' \
Expand Down
4 changes: 2 additions & 2 deletions kinesis-data-firehose/dynamic-partitioning/lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ At this point you can now synthesize the CloudFormation template for this code.

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all \
--parameters FirehoseStreamName=<i>'your-delivery-stream-name'</i> \
--parameters FirehosePrefix=<i>'your-s3-bucket-prefix-for-dynamic-partitioning'</i>
Expand Down Expand Up @@ -102,7 +102,7 @@ Now you can create kinesis data firehose like this:

<pre>
(.venv) $ export CDK_DEFAULT_ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
(.venv) $ export CDK_DEFAULT_REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
(.venv) $ export CDK_DEFAULT_REGION=$(aws configure get region)
(.venv) $ cdk synth --all \
--parameters FirehoseStreamName='PUT-S3-lambda' \
--parameters FirehosePrefix='region=!{partitionKeyFromLambda:region}/device=!{partitionKeyFromLambda:device}/year=!{partitionKeyFromLambda:year}/month=!{partitionKeyFromLambda:month}/day=!{partitionKeyFromLambda:day}/hour=!{partitionKeyFromLambda:hour}/'
Expand Down
Loading

0 comments on commit fe72218

Please sign in to comment.