Skip to content

Commit 5c64f5c

Browse files
DOC-448(hotfix): Replace remaining awslocal references with lstk aws (#927)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent a60cdfd commit 5c64f5c

4 files changed

Lines changed: 24 additions & 24 deletions

File tree

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function handler(event) {
8383
Create the function with [`CreateFunction`](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateFunction.html):
8484

8585
```bash
86-
awslocal cloudfront create-function \
86+
lstk aws cloudfront create-function \
8787
--name stamp-env \
8888
--function-code fileb://stamp-env.js \
8989
--function-config 'Comment=stamp the environment,Runtime=cloudfront-js-2.0'
@@ -135,7 +135,7 @@ Write the event object to a file:
135135
Pass the ETag returned by `create-function` as `--if-match`:
136136

137137
```bash
138-
awslocal cloudfront test-function \
138+
lstk aws cloudfront test-function \
139139
--name stamp-env \
140140
--if-match 54ddd071 \
141141
--event-object fileb://event.json \
@@ -173,7 +173,7 @@ Use it for debugging, but do not assert on it in tests.
173173
[`PublishFunction`](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_PublishFunction.html) marks the function ready to associate with a distribution:
174174

175175
```bash
176-
awslocal cloudfront publish-function --name stamp-env --if-match 54ddd071
176+
lstk aws cloudfront publish-function --name stamp-env --if-match 54ddd071
177177
```
178178

179179
```bash title="Output"
@@ -282,7 +282,7 @@ On a plan without the data plane you can create a store and associate it with a
282282
Create a store with [`CreateKeyValueStore`](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateKeyValueStore.html):
283283

284284
```bash
285-
awslocal cloudfront create-key-value-store \
285+
lstk aws cloudfront create-key-value-store \
286286
--name tenant-map \
287287
--comment "tenant to environment"
288288
```
@@ -317,7 +317,7 @@ Control-plane commands are unaffected.
317317
:::
318318

319319
:::tip
320-
When you use `awslocal`, install the AWS Common Runtime once with `pip install 'botocore[crt]'`.
320+
When you use `lstk aws`, install the AWS Common Runtime once with `pip install 'botocore[crt]'`.
321321
These requests are signed with SigV4A, which a `pip`-installed AWS CLI cannot sign without it.
322322
:::
323323

@@ -332,7 +332,7 @@ Writes require the current ETag in `--if-match`.
332332
Read it from the data plane with [`DescribeKeyValueStore`](https://docs.aws.amazon.com/cloudfront-keyvaluestore/latest/APIReference/API_DescribeKeyValueStore.html):
333333

334334
```bash
335-
awslocal cloudfront-keyvaluestore describe-key-value-store --kvs-arn "$KVS_ARN"
335+
lstk aws cloudfront-keyvaluestore describe-key-value-store --kvs-arn "$KVS_ARN"
336336
```
337337

338338
```bash title="Output"
@@ -350,7 +350,7 @@ awslocal cloudfront-keyvaluestore describe-key-value-store --kvs-arn "$KVS_ARN"
350350
Write several keys at once with [`UpdateKeys`](https://docs.aws.amazon.com/cloudfront-keyvaluestore/latest/APIReference/API_UpdateKeys.html), which also accepts `--deletes`:
351351

352352
```bash
353-
awslocal cloudfront-keyvaluestore update-keys \
353+
lstk aws cloudfront-keyvaluestore update-keys \
354354
--kvs-arn "$KVS_ARN" \
355355
--if-match 02CDEC9C \
356356
--puts 'Key=tenant-a.example.com,Value=prod' 'Key=tenant-b.example.com,Value=prod-sand'
@@ -369,7 +369,7 @@ awslocal cloudfront-keyvaluestore update-keys \
369369
List the contents with [`ListKeys`](https://docs.aws.amazon.com/cloudfront-keyvaluestore/latest/APIReference/API_ListKeys.html):
370370

371371
```bash
372-
awslocal cloudfront-keyvaluestore list-keys --kvs-arn "$KVS_ARN"
372+
lstk aws cloudfront-keyvaluestore list-keys --kvs-arn "$KVS_ARN"
373373
```
374374

375375
```bash title="Output"
@@ -390,7 +390,7 @@ awslocal cloudfront-keyvaluestore list-keys --kvs-arn "$KVS_ARN"
390390
Single keys are handled with [`PutKey`](https://docs.aws.amazon.com/cloudfront-keyvaluestore/latest/APIReference/API_PutKey.html), [`GetKey`](https://docs.aws.amazon.com/cloudfront-keyvaluestore/latest/APIReference/API_GetKey.html) and [`DeleteKey`](https://docs.aws.amazon.com/cloudfront-keyvaluestore/latest/APIReference/API_DeleteKey.html):
391391

392392
```bash
393-
awslocal cloudfront-keyvaluestore get-key --kvs-arn "$KVS_ARN" --key tenant-a.example.com
393+
lstk aws cloudfront-keyvaluestore get-key --kvs-arn "$KVS_ARN" --key tenant-a.example.com
394394
```
395395

396396
```bash title="Output"
@@ -441,7 +441,7 @@ Concurrency and lookup failures surface as follows:
441441
Associate the store when you create the function, through `KeyValueStoreAssociations`:
442442

443443
```bash
444-
awslocal cloudfront create-function \
444+
lstk aws cloudfront create-function \
445445
--name tenant-router \
446446
--function-code fileb://tenant-router.js \
447447
--function-config "Comment=tenant pre-router,Runtime=cloudfront-js-2.0,KeyValueStoreAssociations={Quantity=1,Items=[{KeyValueStoreARN=$KVS_ARN}]}"
@@ -553,19 +553,19 @@ async function handler(event) {
553553
Create the function with the store associated, then publish it:
554554

555555
```bash
556-
export FUNCTION_ETAG=$(awslocal cloudfront create-function \
556+
export FUNCTION_ETAG=$(lstk aws cloudfront create-function \
557557
--name tenant-router \
558558
--function-code fileb://tenant-router.js \
559559
--function-config "Comment=tenant pre-router,Runtime=cloudfront-js-2.0,KeyValueStoreAssociations={Quantity=1,Items=[{KeyValueStoreARN=$KVS_ARN}]}" \
560560
--query ETag --output text)
561-
awslocal cloudfront publish-function --name tenant-router --if-match "$FUNCTION_ETAG"
561+
lstk aws cloudfront publish-function --name tenant-router --if-match "$FUNCTION_ETAG"
562562
```
563563

564564
Confirm the routing decision with `test-function` before wiring up a distribution.
565565
With `host` set to `tenant-b.example.com` in `event.json`, the function resolves the tenant through the store:
566566

567567
```bash
568-
awslocal cloudfront test-function \
568+
lstk aws cloudfront test-function \
569569
--name tenant-router \
570570
--if-match "$FUNCTION_ETAG" \
571571
--event-object fileb://event.json \
@@ -621,7 +621,7 @@ To exercise the same path over a real request, create a distribution that lists
621621
```
622622

623623
```bash
624-
awslocal cloudfront create-distribution \
624+
lstk aws cloudfront create-distribution \
625625
--distribution-config file://distribution-config.json \
626626
--query '{Id:Distribution.Id,DomainName:Distribution.DomainName}'
627627
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,19 +190,19 @@ The following example uses the `subnet_id` variable set in the [Getting started]
190190

191191
```bash
192192
# Create the load balancer
193-
loadBalancer=$(awslocal elbv2 create-load-balancer \
193+
loadBalancer=$(lstk aws elbv2 create-load-balancer \
194194
--name multi-listener-lb \
195195
--subnets $subnet_id | jq -r '.LoadBalancers[].LoadBalancerArn')
196196

197197
# Listener on port 80
198-
awslocal elbv2 create-listener \
198+
lstk aws elbv2 create-listener \
199199
--load-balancer-arn $loadBalancer \
200200
--protocol HTTP \
201201
--port 80 \
202202
--default-actions '{"Type":"fixed-response","FixedResponseConfig":{"StatusCode":"200","MessageBody":"Listener 80","ContentType":"text/plain"}}'
203203

204204
# Listener on port 8080
205-
awslocal elbv2 create-listener \
205+
lstk aws elbv2 create-listener \
206206
--load-balancer-arn $loadBalancer \
207207
--protocol HTTP \
208208
--port 8080 \

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ export const handler = withDurableExecution(async (event, context) => {
548548
Create the function with a five-minute execution timeout and seven-day retention period:
549549

550550
```bash
551-
awslocal lambda create-function \
551+
lstk aws lambda create-function \
552552
--function-name durable-hello \
553553
--runtime nodejs22.x \
554554
--handler index.handler \
@@ -574,7 +574,7 @@ awslocal lambda create-function \
574574
Wait for the function to become active:
575575

576576
```bash
577-
awslocal lambda wait function-active-v2 --function-name durable-hello
577+
lstk aws lambda wait function-active-v2 --function-name durable-hello
578578
```
579579

580580
Create `event.json`:
@@ -589,7 +589,7 @@ Start an asynchronous durable execution.
589589
Use a qualified function target and a durable execution name, which acts as an idempotency key:
590590

591591
```bash
592-
EXECUTION_ARN=$(awslocal lambda invoke \
592+
EXECUTION_ARN=$(lstk aws lambda invoke \
593593
--function-name durable-hello \
594594
--qualifier '$LATEST' \
595595
--invocation-type Event \
@@ -607,7 +607,7 @@ arn:aws:lambda:us-east-1:000000000000:function:durable-hello:$LATEST/durable-exe
607607
After the execution finishes, retrieve its status and result:
608608

609609
```bash
610-
awslocal lambda get-durable-execution \
610+
lstk aws lambda get-durable-execution \
611611
--durable-execution-arn "$EXECUTION_ARN" \
612612
--query '{DurableExecutionName:DurableExecutionName,Status:Status,Result:Result,DurableConfig:DurableConfig}'
613613
```
@@ -627,7 +627,7 @@ awslocal lambda get-durable-execution \
627627
Inspect the execution history to see the checkpoint, suspension, replay, and completion:
628628

629629
```bash
630-
awslocal lambda get-durable-execution-history \
630+
lstk aws lambda get-durable-execution-history \
631631
--durable-execution-arn "$EXECUTION_ARN" \
632632
--query 'Events[].EventType'
633633
```

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ The following credentials pass validation:
227227
For example, after [creating a role](/aws/services/sts/#create-an-iam-role), you can retrieve temporary credentials for it using the `AssumeRole` API:
228228

229229
```bash
230-
awslocal sts assume-role \
230+
lstk aws sts assume-role \
231231
--role-arn arn:aws:iam::000000000000:role/localstack-role \
232232
--role-session-name localstack-session
233233
```
@@ -251,7 +251,7 @@ export AWS_ACCESS_KEY_ID=ACCESS_KEY_ID
251251
export AWS_SECRET_ACCESS_KEY=SECRET_ACCESS_KEY
252252
export AWS_SESSION_TOKEN=SESSION_TOKEN
253253

254-
awslocal s3api list-buckets
254+
lstk aws s3api list-buckets
255255
```
256256

257257
:::note

0 commit comments

Comments
 (0)