Skip to content

Commit b0fb87d

Browse files
docs(aws/services): migrate /aws/services section to use lstk (#789)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent efb8a2e commit b0fb87d

96 files changed

Lines changed: 899 additions & 868 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/content/docs/aws/services/account.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ It's important to note that LocalStack doesn't offer a programmatic interface to
2323

2424
## Getting started
2525

26-
This guide is designed for users who are new to Account and assumes basic knowledge of the AWS CLI and our [`awslocal`](https://github.com/localstack/awscli-local) wrapper script.
26+
This guide is designed for users who are new to Account and assumes basic knowledge of the AWS CLI and our [`lstk aws`](/aws/developer-tools/running-localstack/lstk/#aws) command.
2727

2828
Start your LocalStack container using your preferred method.
2929
We will demonstrate how to put contact information, fetch account details, and attach an alternate contact to your account.
@@ -34,7 +34,7 @@ You can use the [`PutContactInformation`](https://docs.aws.amazon.com/accounts/l
3434
Run the following command to add contact information to your account:
3535

3636
```bash showshowLineNumbers
37-
awslocal account put-contact-information \
37+
lstk aws account put-contact-information \
3838
--contact-information '{
3939
"FullName": "Jane Doe",
4040
"PhoneNumber": "+XXXXXXXXX",
@@ -52,7 +52,7 @@ You can use the [`GetContactInformation`](https://docs.aws.amazon.com/accounts/l
5252
Run the following command to fetch the contact information for your account:
5353

5454
```bash
55-
awslocal account get-contact-information
55+
lstk aws account get-contact-information
5656
```
5757

5858
```bash title="Output" showshowLineNumbers
@@ -75,7 +75,7 @@ You can attach an alternate contact using [`PutAlternateContact`](https://docs.a
7575
Run the following command to attach an alternate contact to your account:
7676

7777
```bash showshowLineNumbers
78-
awslocal account put-alternate-contact \
78+
lstk aws account put-alternate-contact \
7979
--alternate-contact-type "BILLING" \
8080
--email-address "bill@ing.com" \
8181
--name "Bill Ing" \

src/content/docs/aws/services/acm-pca.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w
1818

1919
## Getting started
2020

21-
This guide is designed for users who are new to ACM PCA and assumes basic knowledge of the AWS CLI and our [`awslocal`](https://github.com/localstack/awscli-local) wrapper script.
21+
This guide is designed for users who are new to ACM PCA and assumes basic knowledge of the AWS CLI and our [`lstk aws`](/aws/developer-tools/running-localstack/lstk/#aws) command.
2222
We will follow the procedure to create and install a certificate for a single-level hierarchy CA hosted by ACM PCA.
2323

2424
### Create a CA
@@ -27,7 +27,7 @@ Start by creating a new Certificate Authority with ACM PCA using the [`CreateCer
2727
This command sets up a new CA with specified configurations for key algorithm, signing algorithm, and subject information.
2828

2929
```bash
30-
awslocal acm-pca create-certificate-authority \
30+
lstk aws acm-pca create-certificate-authority \
3131
--certificate-authority-configuration '{
3232
"KeyAlgorithm":"RSA_2048",
3333
"SigningAlgorithm":"SHA256WITHRSA",
@@ -53,7 +53,7 @@ To retrieve the detailed information about the created Certificate Authority, us
5353
This command returns the detailed information about the CA, including the CA's ARN, status, and configuration.
5454

5555
```bash
56-
awslocal acm-pca describe-certificate-authority \
56+
lstk aws acm-pca describe-certificate-authority \
5757
--certificate-authority-arn arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff
5858
```
5959

@@ -94,15 +94,15 @@ In the following steps, we will create and attach a certificate for this CA.
9494
Use the [`GetCertificateAuthorityCsr`](https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetCertificateAuthorityCsr.html) operation to obtain the Certificate Signing Request (CSR) for the CA.
9595

9696
```bash
97-
awslocal acm-pca get-certificate-authority-csr \
97+
lstk aws acm-pca get-certificate-authority-csr \
9898
--certificate-authority-arn arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff \
9999
--output text | tee ca.csr
100100
```
101101

102102
Next, issue the certificate for the CA using this CSR.
103103

104104
```bash
105-
awslocal acm-pca issue-certificate \
105+
lstk aws acm-pca issue-certificate \
106106
--csr fileb://ca.csr \
107107
--signing-algorithm SHA256WITHRSA \
108108
--template-arn arn:aws:acm-pca:::template/RootCACertificate/V1 \
@@ -123,14 +123,14 @@ The CA certificate is now created and its ARN is indicated by the `CertificateAr
123123
Finally, we retrieve the signed certificate with [`GetCertificate`](https://docs.aws.amazon.com/privateca/latest/APIReference/API_GetCertificate.html) and import it using [`ImportCertificateAuthorityCertificate`](https://docs.aws.amazon.com/privateca/latest/APIReference/API_ImportCertificateAuthorityCertificate.html).
124124

125125
```bash
126-
awslocal acm-pca get-certificate \
126+
lstk aws acm-pca get-certificate \
127127
--certificate-authority-arn arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff \
128128
--certificate-arn arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff/certificate/17ef7bbf3cc6471ba3ef0707119b8392 \
129129
--output text | tee cert.pem
130130
```
131131

132132
```bash
133-
awslocal acm-pca import-certificate-authority-certificate \
133+
lstk aws acm-pca import-certificate-authority-certificate \
134134
--certificate-authority-arn arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff \
135135
--certificate fileb://cert.pem
136136
```
@@ -139,7 +139,7 @@ The CA is now ready for use.
139139
You can verify this by checking its status:
140140

141141
```bash
142-
awslocal acm-pca describe-certificate-authority \
142+
lstk aws acm-pca describe-certificate-authority \
143143
--certificate-authority-arn arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff \
144144
--query CertificateAuthority.Status \
145145
--output text
@@ -196,7 +196,7 @@ Next, using [`IssueCertificate`](https://docs.aws.amazon.com/privateca/latest/AP
196196
Note that there is no [certificate template](https://docs.aws.amazon.com/privateca/latest/userguide/UsingTemplates.html) specified which causes the end-entity certificate to be issued by default.
197197

198198
```bash
199-
awslocal acm-pca issue-certificate \
199+
lstk aws acm-pca issue-certificate \
200200
--certificate-authority-arn arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff \
201201
--csr fileb://local-csr.pem \
202202
--signing-algorithm "SHA256WITHRSA" \
@@ -231,7 +231,7 @@ Use the [`TagCertificateAuthority`](https://docs.aws.amazon.com/privateca/latest
231231
This command adds the specified tags to the specified CA.
232232

233233
```bash
234-
awslocal acm-pca tag-certificate-authority \
234+
lstk aws acm-pca tag-certificate-authority \
235235
--certificate-authority-arn arn:aws:acm-pca:us-east-1:000000000000:certificate-authority/f38ee966-bc23-40f8-8143-e981aee73600 \
236236
--tags Key=Admin,Value=Alice
237237
```
@@ -240,7 +240,7 @@ After tagging your Certificate Authority, you may want to view these tags.
240240
You can use the [`ListTags`](https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListTags.html) API to list all the tags associated with the specified CA.
241241

242242
```bash
243-
awslocal acm-pca list-tags \
243+
lstk aws acm-pca list-tags \
244244
--certificate-authority-arn arn:aws:acm-pca:us-east-1:000000000000:certificate-authority/f38ee966-bc23-40f8-8143-e981aee73600 \
245245
--max-results 10
246246
```

src/content/docs/aws/services/acm.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w
2020

2121
## Getting started
2222

23-
This guide is designed for users who are new to ACM and assumes basic knowledge of the AWS CLI and our [`awslocal`](https://github.com/localstack/awscli-local) wrapper script.
23+
This guide is designed for users who are new to ACM and assumes basic knowledge of the AWS CLI and our [`lstk aws`](/aws/developer-tools/running-localstack/lstk/#aws) command.
2424

2525
### Request a public certificate
2626

@@ -29,7 +29,7 @@ Specify the domain name you want to request the certificate for, and any additio
2929
Here's an example command:
3030

3131
```bash showshowLineNumbers
32-
awslocal acm request-certificate \
32+
lstk aws acm request-certificate \
3333
--domain-name www.example.com \
3434
--validation-method DNS \
3535
--idempotency-token 1234 \
@@ -51,7 +51,7 @@ This command returns a list of the ARNs of all the certificates that have been r
5151
Here's an example command:
5252

5353
```bash
54-
awslocal acm list-certificates --max-items 10
54+
lstk aws acm list-certificates --max-items 10
5555
```
5656

5757
### Describe the certificate
@@ -61,7 +61,7 @@ Provide the ARN of the certificate you want to view, and this command will retur
6161
Here's an example command:
6262

6363
```bash
64-
awslocal acm describe-certificate --certificate-arn arn:aws:acm:<region>:account:certificate/<certificate_ID>
64+
lstk aws acm describe-certificate --certificate-arn arn:aws:acm:<region>:account:certificate/<certificate_ID>
6565
```
6666

6767
### Delete the certificate
@@ -70,7 +70,7 @@ Finally you can use the [`DeleteCertificate` API](https://docs.aws.amazon.com/ac
7070
Here's an example command:
7171

7272
```bash
73-
awslocal acm delete-certificate --certificate-arn arn:aws:acm:<region>:account:certificate/<certificate_ID>
73+
lstk aws acm delete-certificate --certificate-arn arn:aws:acm:<region>:account:certificate/<certificate_ID>
7474
```
7575

7676
## Resource Browser

src/content/docs/aws/services/apigateway.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The supported APIs are available on the API coverage section for [API Gateway V1
2121

2222
## Getting started
2323

24-
This guide is designed for users new to API Gateway and assumes basic knowledge of the AWS CLI and our [`awslocal`](https://github.com/localstack/awscli-local) wrapper script.
24+
This guide is designed for users new to API Gateway and assumes basic knowledge of the AWS CLI and our [`lstk aws`](/aws/developer-tools/running-localstack/lstk/#aws) command.
2525

2626
Start your LocalStack container using your preferred method.
2727
We will use the Lambda proxy integration to integrate an API method with a Lambda function.
@@ -49,12 +49,12 @@ module.exports = {
4949
```
5050

5151
The above code defines a function named `apiHandler` that returns a response with a status code of `200` and a body containing the string `Hello from Lambda`.
52-
Zip the file and upload it to LocalStack using the `awslocal` CLI.
52+
Zip the file and upload it to LocalStack using the `lstk aws` command.
5353
Run the following command:
5454

5555
```bash showshowLineNumbers
5656
zip function.zip lambda.js
57-
awslocal lambda create-function \
57+
lstk aws lambda create-function \
5858
--function-name apigw-lambda \
5959
--runtime nodejs16.x \
6060
--handler lambda.apiHandler \
@@ -71,7 +71,7 @@ We will use the API Gateway's [`CreateRestApi`](https://docs.aws.amazon.com/apig
7171
Here's an example command:
7272

7373
```bash
74-
awslocal apigateway create-rest-api --name 'API Gateway Lambda integration'
74+
lstk aws apigateway create-rest-api --name 'API Gateway Lambda integration'
7575
```
7676

7777
This creates a new REST API named `API Gateway Lambda integration`.
@@ -99,7 +99,7 @@ You'll need this ID for the next step.
9999
Use the REST API ID generated in the previous step to fetch the resources for the API, using the [`GetResources`](https://docs.aws.amazon.com/apigateway/latest/api/API_GetResources.html) API:
100100

101101
```bash
102-
awslocal apigateway get-resources --rest-api-id <REST_API_ID>
102+
lstk aws apigateway get-resources --rest-api-id <REST_API_ID>
103103
```
104104

105105
```bash title="Output"
@@ -122,7 +122,7 @@ Create a new resource for the API using the [`CreateResource`](https://docs.aws.
122122
Use the ID of the resource returned in the previous step as the parent ID:
123123

124124
```bash showshowLineNumbers
125-
awslocal apigateway create-resource \
125+
lstk aws apigateway create-resource \
126126
--rest-api-id <REST_API_ID> \
127127
--parent-id <PARENT_ID> \
128128
--path-part "{somethingId}"
@@ -146,7 +146,7 @@ Add a `GET` method to the resource using the [`PutMethod`](https://docs.aws.amaz
146146
Use the ID of the resource returned in the previous step as the Resource ID:
147147

148148
```bash showshowLineNumbers
149-
awslocal apigateway put-method \
149+
lstk aws apigateway put-method \
150150
--rest-api-id <REST_API_ID> \
151151
--resource-id <RESOURCE_ID> \
152152
--http-method GET \
@@ -168,7 +168,7 @@ awslocal apigateway put-method \
168168
Now, create a new integration for the method using the [`PutIntegration`](https://docs.aws.amazon.com/apigateway/latest/api/API_PutIntegration.html) API.
169169

170170
```bash showshowLineNumbers
171-
awslocal apigateway put-integration \
171+
lstk aws apigateway put-integration \
172172
--rest-api-id <REST_API_ID> \
173173
--resource-id <RESOURCE_ID> \
174174
--http-method GET \
@@ -186,7 +186,7 @@ We can now proceed with the deployment before invoking the API.
186186
Create a new deployment for the API using the [`CreateDeployment`](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateDeployment.html) API:
187187

188188
```bash
189-
awslocal apigateway create-deployment \
189+
lstk aws apigateway create-deployment \
190190
--rest-api-id <REST_API_ID> \
191191
--stage-name dev
192192
```
@@ -346,10 +346,10 @@ functions:
346346
```
347347

348348
Upon deployment of the Serverless project, LocalStack creates a new API Gateway V2 endpoint.
349-
To retrieve the list of APIs and verify the WebSocket endpoint, you can use the `awslocal` CLI:
349+
To retrieve the list of APIs and verify the WebSocket endpoint, you can use the `lstk aws` CLI:
350350

351351
```bash
352-
awslocal apigatewayv2 get-apis
352+
lstk aws apigatewayv2 get-apis
353353
```
354354

355355
```bash title="Output"
@@ -377,7 +377,7 @@ To push data from a backend service to the WebSocket connection, you can use the
377377
In LocalStack, use the following CLI command (replace `<connectionId>` with your WebSocket connection ID):
378378

379379
```bash
380-
awslocal apigatewaymanagementapi \
380+
lstk aws apigatewaymanagementapi \
381381
post-to-connection \
382382
--connection-id '<connectionId>' \
383383
--data '{"msg": "Hi"}'
@@ -392,7 +392,7 @@ To assign a custom ID to an API Gateway REST API, use the `create-rest-api` comm
392392
The following example assigns the custom ID `"myid123"` to the API:
393393

394394
```bash
395-
awslocal apigateway create-rest-api --name my-api --tags '{"_custom_id_":"myid123"}'
395+
lstk aws apigateway create-rest-api --name my-api --tags '{"_custom_id_":"myid123"}'
396396
```
397397

398398
```bash title="Output"
@@ -405,7 +405,7 @@ awslocal apigateway create-rest-api --name my-api --tags '{"_custom_id_":"myid12
405405
You can also configure the protocol type, the possible values being `HTTP` and `WEBSOCKET`:
406406

407407
```bash showshowLineNumbers
408-
awslocal apigatewayv2 create-api \
408+
lstk aws apigatewayv2 create-api \
409409
--name=my-api \
410410
--protocol-type=HTTP --tags="_custom_id_=my-api"
411411
{

src/content/docs/aws/services/appconfig.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The supported APIs are available on our [API Coverage section](#api-coverage), w
1515

1616
## Getting started
1717

18-
This guide is designed for users new to AppConfig and assumes basic knowledge of the AWS CLI and our [`awslocal`](https://github.com/localstack/awscli-local) wrapper script.
18+
This guide is designed for users new to AppConfig and assumes basic knowledge of the AWS CLI and our [`lstk aws`](/aws/developer-tools/running-localstack/lstk/#aws) command.
1919

2020
Start your LocalStack container using your preferred method.
2121
We will demonstrate how to create an AppConfig application, environment, configuration profiles & feature flags, and deploy the configuration with the AWS CLI.
@@ -27,7 +27,7 @@ The application is a folder/directory that contains the configuration data for y
2727
The following command creates an application named `my-app`:
2828

2929
```bash
30-
awslocal appconfig create-application \
30+
lstk aws appconfig create-application \
3131
--name my-app \
3232
--description "My application"
3333
```
@@ -47,7 +47,7 @@ An environment consists of the deployment group of your AppConfig applications.
4747
The following command creates an environment named `my-app-env`:
4848

4949
```bash
50-
awslocal appconfig create-environment \
50+
lstk aws appconfig create-environment \
5151
--application-id 400c285 \
5252
--name my-app-env \
5353
--description "My application environment"
@@ -73,7 +73,7 @@ A configuration profile contains for the configurations of your AppConfig applic
7373
The following command creates a configuration profile named `my-app-config`:
7474

7575
```bash
76-
awslocal appconfig create-configuration-profile \
76+
lstk aws appconfig create-configuration-profile \
7777
--application-id 400c285 \
7878
--name my-app-config \
7979
--location-uri hosted \
@@ -110,7 +110,7 @@ You can now use the [`CreateHostedConfigurationVersion`](https://docs.aws.amazon
110110
The following command creates a hosted configuration version for the configuration profile you created in the previous step:
111111

112112
```bash
113-
awslocal appconfig create-hosted-configuration-version \
113+
lstk aws appconfig create-hosted-configuration-version \
114114
--application-id 400c285 \
115115
--configuration-profile-id 7d748f9 \
116116
--content-type "application/json" \
@@ -134,7 +134,7 @@ A deployment strategy defines important criteria for rolling out your configurat
134134
The following command creates a deployment strategy named `my-app-deployment-strategy`:
135135

136136
```bash
137-
awslocal appconfig create-deployment-strategy \
137+
lstk aws appconfig create-deployment-strategy \
138138
--name my-app-deployment-strategy \
139139
--description "My application deployment strategy" \
140140
--deployment-duration-in-minutes 10 \
@@ -155,7 +155,7 @@ You can now use the [`StartDeployment`](https://docs.aws.amazon.com/appconfig/la
155155
The following command deploys the configuration to the environment you created in the previous step:
156156

157157
```bash
158-
awslocal appconfig start-deployment \
158+
lstk aws appconfig start-deployment \
159159
--application-id 400c285 \
160160
--environment-id 3695ea3 \
161161
--deployment-strategy-id f2f2225 \

0 commit comments

Comments
 (0)