Skip to content

Commit 7f5dcd3

Browse files
committed
do a bunch
1 parent 3b2d34d commit 7f5dcd3

File tree

4 files changed

+120
-112
lines changed

4 files changed

+120
-112
lines changed

src/content/docs/aws/services/redshift.md

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "Redshift"
3-
linkTitle: "Redshift"
43
description: Get started with Redshift on LocalStack
54
tags: ["Free", "Ultimate"]
65
---
@@ -12,12 +11,12 @@ RedShift is fully managed by AWS and serves as a petabyte-scale service which al
1211
The query results can be saved to an S3 Data Lake while additional analytics can be provided by Athena or SageMaker.
1312

1413
LocalStack allows you to use the RedShift APIs in your local environment to analyze structured and semi-structured data across local data warehouses and data lakes.
15-
The supported APIs are available on our [API coverage page]({{< ref "coverage_redshift" >}}), which provides information on the extent of RedShift's integration with LocalStack.
14+
The supported APIs are available on our [API coverage page](), which provides information on the extent of RedShift's integration with LocalStack.
1615

17-
{{< callout "Note" >}}
16+
:::note
1817
Users on Free plan can use RedShift APIs in LocalStack for basic mocking and testing.
1918
For advanced features like Redshift Data API and other emulation capabilities, please refer to the Ultimate plan.
20-
{{< /callout >}}
19+
:::
2120

2221
## Getting started
2322

@@ -51,108 +50,106 @@ You will also create a Glue database, connection, and crawler to populate the Gl
5150
You can create a RedShift cluster using the [`CreateCluster`](https://docs.aws.amazon.com/redshift/latest/APIReference/API_CreateCluster.html) API.
5251
The following command will create a RedShift cluster with the variables defined above:
5352

54-
{{< command >}}
55-
$ awslocal redshift create-cluster \
53+
```bash
54+
awslocal redshift create-cluster \
5655
--cluster-identifier $REDSHIFT_CLUSTER_IDENTIFIER \
5756
--db-name $REDSHIFT_DATABASE_NAME \
5857
--master-username $REDSHIFT_USERNAME \
5958
--master-user-password $REDSHIFT_PASSWORD \
6059
--node-type n1
61-
{{< / command >}}
60+
```
6261

6362
You can fetch the status of the cluster using the [`DescribeClusters`](https://docs.aws.amazon.com/redshift/latest/APIReference/API_DescribeClusters.html) API.
6463
Run the following command to extract the URL of the cluster:
6564

66-
{{< command >}}
67-
$ REDSHIFT_URL=$(awslocal redshift describe-clusters \
65+
```bash
66+
REDSHIFT_URL=$(awslocal redshift describe-clusters \
6867
--cluster-identifier $REDSHIFT_CLUSTER_IDENTIFIER | jq -r '(.Clusters[0].Endpoint.Address) + ":" + (.Clusters[0].Endpoint.Port|tostring)')
69-
{{< / command >}}
68+
```
7069

7170
### Create a Glue database, connection, and crawler
7271

7372
You can create a Glue database using the [`CreateDatabase`](https://docs.aws.amazon.com/glue/latest/webapi/API_CreateDatabase.html) API.
7473
The following command will create a Glue database:
7574

76-
{{< command >}}
77-
$ awslocal glue create-database \
75+
```bash
76+
awslocal glue create-database \
7877
--database-input "{\"Name\": \"$GLUE_DATABASE_NAME\"}"
79-
{{< / command >}}
78+
```
8079

8180
You can create a connection to the RedShift cluster using the [`CreateConnection`](https://docs.aws.amazon.com/glue/latest/webapi/API_CreateConnection.html) API.
8281
The following command will create a Glue connection with the RedShift cluster:
8382

84-
{{< command >}}
85-
$ awslocal glue create-connection \
83+
```bash
84+
awslocal glue create-connection \
8685
--connection-input "{\"Name\":\"$GLUE_CONNECTION_NAME\", \"ConnectionType\": \"JDBC\", \"ConnectionProperties\": {\"USERNAME\": \"$REDSHIFT_USERNAME\", \"PASSWORD\": \"$REDSHIFT_PASSWORD\", \"JDBC_CONNECTION_URL\": \"jdbc:redshift://$REDSHIFT_URL/$REDSHIFT_DATABASE_NAME\"}}"
87-
{{< / command >}}
86+
```
8887

8988
Finally, you can create a Glue crawler using the [`CreateCrawler`](https://docs.aws.amazon.com/glue/latest/webapi/API_CreateCrawler.html) API.
9089
The following command will create a Glue crawler:
9190

92-
{{< command >}}
93-
$ awslocal glue create-crawler \
91+
```bash
92+
awslocal glue create-crawler \
9493
--name $GLUE_CRAWLER_NAME \
9594
--database-name $GLUE_DATABASE_NAME \
9695
--targets "{\"JdbcTargets\": [{\"ConnectionName\": \"$GLUE_CONNECTION_NAME\", \"Path\": \"$REDSHIFT_DATABASE_NAME/%/$REDSHIFT_TABLE_NAME\"}]}" \
9796
--role r1
98-
{{< / command >}}
97+
```
9998

10099
### Create table in RedShift
101100

102101
You can create a table in RedShift using the [`CreateTable`](https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_TABLE_NEW.html) API.
103102
The following command will create a table in RedShift:
104103

105-
{{< command >}}
106-
$ REDSHIFT_STATEMENT_ID=$(awslocal redshift-data execute-statement \
104+
```bash
105+
REDSHIFT_STATEMENT_ID=$(awslocal redshift-data execute-statement \
107106
--cluster-identifier $REDSHIFT_CLUSTER_IDENTIFIER \
108107
--database $REDSHIFT_DATABASE_NAME \
109108
--sql \
110109
"create table $REDSHIFT_TABLE_NAME(salesid integer not null, listid integer not null, sellerid integer not null, buyerid integer not null, eventid integer not null, dateid smallint not null, qtysold smallint not null, pricepaid decimal(8,2), commission decimal(8,2), saletime timestamp)" | jq -r .Id)
111-
{{< / command >}}
110+
```
112111

113112
You can check the status of the statement using the [`DescribeStatement`](https://docs.aws.amazon.com/redshift-data/latest/APIReference/API_DescribeStatement.html) API.
114113
The following command will check the status of the statement:
115114

116-
{{< command >}}
117-
$ wait "awslocal redshift-data describe-statement \
115+
```bash
116+
wait "awslocal redshift-data describe-statement \
118117
--id $REDSHIFT_STATEMENT_ID" ".Status" "FINISHED"
119-
{{< / command >}}
118+
```
120119

121120
### Run the crawler
122121

123122
You can run the crawler using the [`StartCrawler`](https://docs.aws.amazon.com/glue/latest/webapi/API_StartCrawler.html) API.
124123
The following command will run the crawler:
125124

126-
{{< command >}}
127-
$ awslocal glue start-crawler \
125+
```bash
126+
awslocal glue start-crawler \
128127
--name $GLUE_CRAWLER_NAME
129-
{{< / command >}}
128+
```
130129

131130
You can wait for the crawler to finish using the [`GetCrawler`](https://docs.aws.amazon.com/glue/latest/webapi/API_GetCrawler.html) API.
132131
The following command will wait for the crawler to finish:
133132

134-
{{< command >}}
135-
$ wait "awslocal glue get-crawler \
133+
```bash
134+
wait "awslocal glue get-crawler \
136135
--name $GLUE_CRAWLER_NAME" ".Crawler.State" "READY"
137-
{{< / command >}}
136+
```
138137

139138
You can finally retrieve the schema of the table using the [`GetTable`](https://docs.aws.amazon.com/glue/latest/webapi/API_GetTable.html) API.
140139
The following command will retrieve the schema of the table:
141140

142-
{{< command >}}
143-
$ awslocal glue get-table \
141+
```bash
142+
awslocal glue get-table \
144143
--database-name $GLUE_DATABASE_NAME \
145144
--name "${REDSHIFT_DATABASE_NAME}_${REDSHIFT_SCHEMA_NAME}_${REDSHIFT_TABLE_NAME}"
146-
{{< / command >}}
145+
```
147146

148147
## Resource Browser
149148

150149
The LocalStack Web Application provides a Resource Browser for managing RedShift clusters.
151150
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resources** section, and then clicking on **RedShift** under the **Analytics** section.
152151

153-
<img src="redshift-resource-browser.png" alt="RedShift Resource Browser" title="RedShift Resource Browser" width="900" />
154-
<br>
155-
<br>
152+
![RedShift Resource Browser](/images/aws/redshift-resource-browser.png)
156153

157154
The Resource Browser allows you to perform the following actions:
158155

src/content/docs/aws/services/resourcegroups.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "Resource Groups"
3-
linkTitle: "Resource Groups"
43
tags: ["Free"]
54
description: >
65
Get started with Resource Groups on LocalStack
@@ -14,7 +13,7 @@ Resource Groups in AWS provide two types of queries that developers can use to b
1413
With Tag-based queries, developers can organize resources based on common attributes or characteristics, while CloudFormation stack-based queries allow developers to group resources that are deployed together as part of a CloudFormation stack.
1514

1615
LocalStack allows you to use the Resource Groups APIs in your local environment to group and categorize resources based on criteria such as tags, resource types, regions, or custom attributes.
17-
The supported APIs are available on our [API coverage page]({{< ref "coverage_resource-groups" >}}), which provides information on the extent of Resource Group's integration with LocalStack.
16+
The supported APIs are available on our [API coverage page](), which provides information on the extent of Resource Group's integration with LocalStack.
1817

1918
## Getting Started
2019

@@ -34,11 +33,11 @@ A tag-based group is created based on a query of type `TAG_FILTERS_1_0`.
3433
Use the [`CreateGroup`](https://docs.aws.amazon.com/resource-groups/latest/APIReference/API_CreateGroup.html) API to create a Resource Group.
3534
Run the following command to create a Resource Group named `my-resource-group`:
3635

37-
{{< command >}}
38-
$ awslocal resource-groups create-group \
36+
```bash
37+
awslocal resource-groups create-group \
3938
--name my-resource-group \
4039
--resource-query '{"Type":"TAG_FILTERS_1_0","Query":"{\"ResourceTypeFilters\":[\"AWS::EC2::Instance\"],\"TagFilters\":[{\"Key\":\"Stage\",\"Values\":[\"Test\"]}]}"}'
41-
{{< /command >}}
40+
```
4241

4342
You can also specify `AWS::AllSupported` as the `ResourceTypeFilters` value to include all supported resource types in the group.
4443

@@ -47,27 +46,27 @@ You can also specify `AWS::AllSupported` as the `ResourceTypeFilters` value to i
4746
To update a Resource Group, use the [`UpdateGroup`](https://docs.aws.amazon.com/resource-groups/latest/APIReference/API_UpdateGroup.html) API.
4847
Execute the following command to update the Resource Group `my-resource-group`:
4948

50-
{{< command >}}
49+
```bash
5150
awslocal resource-groups update-group \
5251
--group-name my-resource-group \
5352
--description "EC2 S3 buckets and RDS DBs that we are using for the test stage"
54-
{{< /command >}}
53+
```
5554

5655
Furthermore, you can also update the query and tags associated with a Resource Group using the [`UpdateGroup`](https://docs.aws.amazon.com/resource-groups/latest/APIReference/API_UpdateGroup.html) API.
5756
Run the following command to update the query and tags of the Resource Group `my-resource-group`:
5857

59-
{{< command >}}
58+
```bash
6059
awslocal resource-groups update-group-query \
6160
--group-name my-resource-group \
6261
--resource-query '{"Type":"TAG_FILTERS_1_0","Query":"{\"ResourceTypeFilters\":[\"AWS::EC2::Instance\",\"AWS::S3::Bucket\",\"AWS::RDS::DBInstance\"],\"TagFilters\":[{\"Key\":\"Stage\",\"Values\":[\"Test\"]}]}"}'
63-
{{< /command >}}
62+
```
6463

6564
### Delete a Resource Group
6665

6766
To delete a Resource Group, use the [`DeleteGroup`](https://docs.aws.amazon.com/resource-groups/latest/APIReference/API_DeleteGroup.html) API.
6867
Run the following command to delete the Resource Group `my-resource-group`:
6968

70-
{{< command >}}
71-
$ awslocal resource-groups delete-group \
69+
```bash
70+
awslocal resource-groups delete-group \
7271
--group-name my-resource-group
73-
{{< /command >}}
72+
```

src/content/docs/aws/services/route53.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "Route 53"
3-
linkTitle: "Route 53"
43
description: Get started with Route 53 on LocalStack
54
persistence: supported
65
tags: ["Free"]
@@ -14,14 +13,14 @@ In addition to basic DNS functionality, Route 53 offers advanced features like h
1413
Route 53 integrates seamlessly with other AWS services, such as route traffic to CloudFront distributions, S3 buckets configured for static website hosting, EC2 instances, and more.
1514

1615
LocalStack allows you to use the Route53 APIs in your local environment to create hosted zones and to manage DNS entries.
17-
The supported APIs are available on our [API coverage page]({{< ref "coverage_route53" >}}), which provides information on the extent of Route53's integration with LocalStack.
16+
The supported APIs are available on our [API coverage page](), which provides information on the extent of Route53's integration with LocalStack.
1817
LocalStack also integrates with its DNS server to respond to DNS queries with these domains.
1918

20-
{{< callout "note">}}
19+
:::note
2120
LocalStack CLI does not publish port `53` anymore by default.
2221
Use the CLI flag `--host-dns` to expose the port on the host.
2322
This would be required if you want to reach out to Route53 domain names from your host machine, using the LocalStack DNS server.
24-
{{< /callout >}}
23+
:::
2524

2625
## Getting started
2726

@@ -35,12 +34,12 @@ We will demonstrate how to create a hosted zone and query the DNS record with th
3534
You can created a hosted zone for `example.com` using the [`CreateHostedZone`](https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html) API.
3635
Run the following command:
3736

38-
{{< command >}}
39-
$ zone_id=$(awslocal route53 create-hosted-zone \
37+
```bash
38+
zone_id=$(awslocal route53 create-hosted-zone \
4039
--name example.com \
4140
--caller-reference r1 | jq -r '.HostedZone.Id')
42-
$ echo $zone_id
43-
{{< / command >}}
41+
echo $zone_id
42+
```
4443

4544
The following output would be retrieved:
4645

@@ -53,11 +52,11 @@ The following output would be retrieved:
5352
You can now change the resource record sets for the hosted zone `example.com` using the [`ChangeResourceRecordSets`](https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html) API.
5453
Run the following command:
5554

56-
{{< command >}}
57-
$ awslocal route53 change-resource-record-sets \
55+
```bash
56+
awslocal route53 change-resource-record-sets \
5857
--hosted-zone-id $zone_id \
5958
--change-batch 'Changes=[{Action=CREATE,ResourceRecordSet={Name=test.example.com,Type=A,ResourceRecords=[{Value=1.2.3.4}]}}]'
60-
{{< / command >}}
59+
```
6160

6261
The following output would be retrieved:
6362

@@ -73,19 +72,19 @@ The following output would be retrieved:
7372

7473
## DNS resolution
7574

76-
LocalStack Pro supports the ability to respond to DNS queries for your Route53 domain names, with our [integrated DNS server]({{< ref "user-guide/tools/dns-server" >}}).
75+
LocalStack Pro supports the ability to respond to DNS queries for your Route53 domain names, with our [integrated DNS server](/aws/tooling/dns-server).
7776

78-
{{< callout >}}
79-
To follow the example below you must [configure your system DNS to use the LocalStack DNS server]({{< ref "user-guide/tools/dns-server#system-dns-configuration" >}}).
80-
{{< /callout >}}
77+
:::note
78+
To follow the example below you must [configure your system DNS to use the LocalStack DNS server](/aws/tooling/dns-server#system-dns-configuration).
79+
:::
8180

8281
### Query a DNS record
8382

8483
You can query the DNS record using `dig` via the built-in DNS server by running the following command:
8584

86-
{{< command >}}
87-
$ dig @localhost test.example.com
88-
{{< / command >}}
85+
```bash
86+
dig @localhost test.example.com
87+
```
8988

9089
The following output would be retrieved:
9190

@@ -101,7 +100,7 @@ test.example.com. 300 IN A 1.2.3.4
101100

102101
The DNS name `localhost.localstack.cloud`, along with its subdomains like `mybucket.s3.localhost.localstack.cloud`, serves an internal routing purpose within LocalStack.
103102
It facilitates communication between a LocalStack compute environment (such as a Lambda function) and the LocalStack APIs, as well as your containerised applications with the LocalStack APIs.
104-
For example configurations, see the [Network Troubleshooting guide]({{< ref "references/network-troubleshooting/endpoint-url/#from-your-container" >}}).
103+
For example configurations, see the [Network Troubleshooting guide]().
105104

106105
For most use-cases, the default configuration of the internal LocalStack DNS name requires no modification.
107106
It functions seamlessly in typical scenarios.
@@ -115,12 +114,12 @@ This can be accomplished using Route53.
115114
Create a hosted zone for the domain `localhost.localstack.cloud` using the [`CreateHostedZone` API](https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html) API.
116115
Run the following command:
117116

118-
{{< command >}}
119-
$ zone_id=$(awslocal route53 create-hosted-zone \
117+
```bash
118+
zone_id=$(awslocal route53 create-hosted-zone \
120119
--name localhost.localstack.cloud \
121120
--caller-reference r1 | jq -r .HostedZone.Id)
122-
$ echo $zone_id
123-
{{< / command >}}
121+
echo $zone_id
122+
```
124123

125124
The following output would be retrieved:
126125

@@ -131,11 +130,11 @@ The following output would be retrieved:
131130
You can now use the [`ChangeResourceRecordSets`](https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html) API to create a record set for the domain `localhost.localstack.cloud` using the `zone_id` retrieved in the previous step.
132131
Run the following command to accomplish this:
133132

134-
{{< command >}}
135-
$ awslocal route53 change-resource-record-sets \
133+
```bash
134+
awslocal route53 change-resource-record-sets \
136135
--hosted-zone-id $zone_id \
137136
--change-batch '{"Changes":[{"Action":"CREATE","ResourceRecordSet":{"Name":"localhost.localstack.cloud","Type":"A","ResourceRecords":[{"Value":"5.6.7.8"}]}},{"Action":"CREATE","ResourceRecordSet":{"Name":"*.localhost.localstack.cloud","Type":"A","ResourceRecords":[{"Value":"5.6.7.8"}]}}]}'
138-
{{< / command >}}
137+
```
139138

140139
The following output would be retrieved:
141140

@@ -151,10 +150,10 @@ The following output would be retrieved:
151150

152151
You can now verify that the DNS name `localhost.localstack.cloud` and its subdomains resolve to the IP address:
153152

154-
{{< command >}}
155-
$ dig @127.0.0.1 bucket1.s3.localhost.localstack.cloud
156-
$ dig @127.0.0.1 localhost.localstack.cloud
157-
{{< / command >}}
153+
```bash
154+
dig @127.0.0.1 bucket1.s3.localhost.localstack.cloud
155+
dig @127.0.0.1 localhost.localstack.cloud
156+
```
158157

159158
The following output would be retrieved:
160159

@@ -176,7 +175,7 @@ localhost.localstack.cloud. 300 IN A 5.6.7.8
176175
The LocalStack Web Application provides a Route53 for creating hosted zones and to manage DNS entries.
177176
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resources** section, and then clicking on **Route53** under the **Analytics** section.
178177

179-
<img src="route53-resource-browser.png" alt="Route53 Resource Browser" title="Route53 Resource Browser" width="900" />
178+
![Route53 Resource Browser](/images/aws/route53-resource-browser.png)
180179

181180
The Resource Browser allows you to perform the following actions:
182181

0 commit comments

Comments
 (0)