From 6f8cde77d730501146f35cd596c03a9fd8938f06 Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Sun, 22 Jun 2025 06:41:53 +0530 Subject: [PATCH 1/3] do a bunch --- src/content/docs/aws/services/account.mdx | 4 +- src/content/docs/aws/services/acm.mdx | 2 +- src/content/docs/aws/services/apacheflink.mdx | 12 ++--- src/content/docs/aws/services/apigateway.mdx | 33 ++++-------- src/content/docs/aws/services/appconfig.mdx | 12 ++--- src/content/docs/aws/services/appsync.mdx | 33 ++++-------- src/content/docs/aws/services/athena.mdx | 6 +-- src/content/docs/aws/services/autoscaling.mdx | 8 +-- src/content/docs/aws/services/backup.mdx | 11 ++-- src/content/docs/aws/services/batch.mdx | 24 +++------ src/content/docs/aws/services/bedrock.mdx | 5 +- src/content/docs/aws/services/ce.mdx | 24 +++------ src/content/docs/aws/services/cloudtrail.mdx | 8 +-- src/content/docs/aws/services/cloudwatch.mdx | 12 ++--- src/content/docs/aws/services/codecommit.mdx | 8 +-- src/content/docs/aws/services/codedeploy.mdx | 52 +++++-------------- .../docs/aws/services/codepipeline.mdx | 14 ++--- src/content/docs/aws/services/cognito.mdx | 28 +++------- src/content/docs/aws/services/dms.mdx | 2 +- src/content/docs/aws/services/docdb.mdx | 18 ++----- src/content/docs/aws/services/dynamodb.mdx | 20 ++----- .../docs/aws/services/dynamodbstreams.mdx | 8 +-- src/content/docs/aws/services/ec2.mdx | 40 ++++---------- 23 files changed, 105 insertions(+), 279 deletions(-) diff --git a/src/content/docs/aws/services/account.mdx b/src/content/docs/aws/services/account.mdx index a87b7dc7..3d7d0b3c 100644 --- a/src/content/docs/aws/services/account.mdx +++ b/src/content/docs/aws/services/account.mdx @@ -55,9 +55,7 @@ Run the following command to fetch the contact information for your account: awslocal account get-contact-information ``` -The command will return the contact information for your account: - -```json +```bash title="Output" { "ContactInformation": { "AddressLine1": "XXXX Main St", diff --git a/src/content/docs/aws/services/acm.mdx b/src/content/docs/aws/services/acm.mdx index f1adec9a..7bdcb03c 100644 --- a/src/content/docs/aws/services/acm.mdx +++ b/src/content/docs/aws/services/acm.mdx @@ -37,7 +37,7 @@ awslocal acm request-certificate \ This command will return the Amazon Resource Name (ARN) of the new certificate, which you can use in other ACM commands. -```json +```bash title="Output" { "CertificateArn": "arn:aws:acm::000000000000:certificate/" } diff --git a/src/content/docs/aws/services/apacheflink.mdx b/src/content/docs/aws/services/apacheflink.mdx index 3281bb2f..020a93bb 100644 --- a/src/content/docs/aws/services/apacheflink.mdx +++ b/src/content/docs/aws/services/apacheflink.mdx @@ -177,9 +177,7 @@ awslocal kinesisanalyticsv2 add-application-cloud-watch-logging-option \ --cloud-watch-logging-option '{"LogStreamARN": "arn:aws:logs:us-east-1:000000000000:log-group:msaf-log-group:log-stream:msaf-log-stream"}' ``` -The response will be similar to: - -```json +```bash title="Output" { "ApplicationARN": "arn:aws:kinesisanalytics:us-east-1:000000000000:application/msaf-app", "ApplicationVersionId": 2, @@ -202,9 +200,7 @@ Configured logging options can be retrieved using [DescribeApplication](https:// awslocal kinesisanalyticsv2 describe-application --application-name msaf-app | jq .ApplicationDetail.CloudWatchLoggingOptionDescriptions ``` -The response will be similar to: - -```json +```bash title="Output" [ { "CloudWatchLoggingOptionId": "1.1", @@ -242,9 +238,7 @@ awslocal kinesisanalyticsv2 list-tags-for-resource \ --resource-arn arn:aws:kinesisanalytics:us-east-1:000000000000:application/msaf-app ``` -The response will be similar to: - -```json +```bash title="Output" { "Tags": [ { diff --git a/src/content/docs/aws/services/apigateway.mdx b/src/content/docs/aws/services/apigateway.mdx index b3414efc..b81d6b81 100644 --- a/src/content/docs/aws/services/apigateway.mdx +++ b/src/content/docs/aws/services/apigateway.mdx @@ -74,9 +74,8 @@ awslocal apigateway create-rest-api --name 'API Gateway Lambda integration' ``` This creates a new REST API named `API Gateway Lambda integration`. -The above command returns the following response: -```json +```bash title="Output" { "id": "cor3o5oeci", "name": "API Gateway Lambda integration", @@ -102,9 +101,7 @@ Use the REST API ID generated in the previous step to fetch the resources for th awslocal apigateway get-resources --rest-api-id ``` -The above command returns the following response: - -```json +```bash title="Output" { "items": [ { @@ -130,9 +127,7 @@ awslocal apigateway create-resource \ --path-part "{somethingId}" ``` -The above command returns the following response: - -```json +```bash title="Output" { "id": "zzcvcf56ar", "parentId": "u53af9hm83", @@ -158,9 +153,7 @@ awslocal apigateway put-method \ --authorization-type "NONE" ``` -The above command returns the following response: - -```json +```bash title="Output" { "httpMethod": "GET", "authorizationType": "NONE", @@ -204,9 +197,7 @@ You can use [curl](https://curl.se/) or any HTTP REST client to invoke the API e curl -X GET http://.execute-api.localhost.localstack.cloud:4566/dev/test ``` -The response would be: - -```json +```bash title="Output" {"message":"Hello World"} ``` @@ -216,9 +207,7 @@ You can also use our [alternative URL format](#alternative-url-format) in case o curl -X GET http://localhost:4566/_aws/execute-api//dev/test ``` -The response would be: - -```json +```bash title="Output" {"message":"Hello World"} ``` @@ -362,9 +351,7 @@ To retrieve the list of APIs and verify the WebSocket endpoint, you can use the awslocal apigatewayv2 get-apis ``` -The response would be: - -```json +```bash title="Output" { "Items": [{ "ApiEndpoint": "ws://localhost:4510", @@ -407,9 +394,7 @@ The following example assigns the custom ID `"myid123"` to the API: awslocal apigateway create-rest-api --name my-api --tags '{"_custom_id_":"myid123"}' ``` -The response would be: - -```json +```bash title="Output" { "id": "myid123", .... @@ -496,4 +481,4 @@ The following code snippets and sample applications provide practical examples o ## API Coverage (V2) - \ No newline at end of file + diff --git a/src/content/docs/aws/services/appconfig.mdx b/src/content/docs/aws/services/appconfig.mdx index 14859065..cc69e1ae 100644 --- a/src/content/docs/aws/services/appconfig.mdx +++ b/src/content/docs/aws/services/appconfig.mdx @@ -118,9 +118,7 @@ awslocal appconfig create-hosted-configuration-version \ configuration-data.json ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ApplicationId": "400c285", "ConfigurationProfileId": "7d748f9", @@ -143,9 +141,7 @@ awslocal appconfig create-deployment-strategy \ --growth-factor 1.0 ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Id": "f2f2225", "Name": "my-app-deployment-strategy", @@ -168,9 +164,7 @@ awslocal appconfig start-deployment \ --description "My application deployment" ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ApplicationId": "400c285", "EnvironmentId": "3695ea3", diff --git a/src/content/docs/aws/services/appsync.mdx b/src/content/docs/aws/services/appsync.mdx index caf6a4f1..4462afb6 100644 --- a/src/content/docs/aws/services/appsync.mdx +++ b/src/content/docs/aws/services/appsync.mdx @@ -41,9 +41,7 @@ Run the following command to list all tables in your running LocalStack containe awslocal dynamodb list-tables ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "TableNames": [ "DynamoDBNotesTable" @@ -62,9 +60,7 @@ awslocal appsync create-graphql-api \ --authentication-type API_KEY ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "graphqlApi": { "name": "NotesApi", @@ -89,9 +85,7 @@ awslocal appsync create-api-key \ --api-id 014d18d0c2b149ee8b66f39173 ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "apiKey": { "id": "31d94a05", @@ -137,9 +131,7 @@ awslocal appsync start-schema-creation \ --definition file://schema.graphql ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "status": "ACTIVE" } @@ -158,9 +150,7 @@ awslocal appsync create-data-source \ --dynamodb-config tableName=DynamoDBNotesTable,awsRegion=us-east-1 ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "dataSource": { "dataSourceArn": "arn:aws:appsync:us-east-1:000000000000:apis/014d18d0c2b149ee8b66f39173/datasources/AppSyncDB", @@ -202,9 +192,7 @@ awslocal appsync create-graphql-api \ --tags _custom_id_=faceb00c ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "graphqlApi": { "name": "my-api", @@ -266,12 +254,13 @@ See the AWS documentation for [`evaluate-mapping-template`](https://awscli.amazo awslocal appsync evaluate-mapping-template \ --template '$ctx.result' \ --context '{"result":"ok"}' - +``` + +```bash title="Output" { "evaluationResult": "ok", "logs": [] } - ``` ### JavaScript resolvers @@ -284,9 +273,7 @@ awslocal appsync evaluate-code \ --context '{"result": "ok"}' ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "evaluationResult": "ok", "logs": [] diff --git a/src/content/docs/aws/services/athena.mdx b/src/content/docs/aws/services/athena.mdx index 9c1cf88c..d782d5f2 100644 --- a/src/content/docs/aws/services/athena.mdx +++ b/src/content/docs/aws/services/athena.mdx @@ -63,9 +63,7 @@ awslocal athena start-query-execution \ --query-string "create external table tbl01 (name STRING, surname STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LOCATION 's3://athena-bucket/data/';" --result-configuration "OutputLocation=s3://athena-bucket/output/" ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "QueryExecutionId": "593acab7" } @@ -154,7 +152,7 @@ awslocal athena get-query-results --query-execution-id $queryId The query should yield a result similar to the output below: -```bash +```bash title="Output" ... "Rows": [ { diff --git a/src/content/docs/aws/services/autoscaling.mdx b/src/content/docs/aws/services/autoscaling.mdx index e5f742cd..d96e0bcd 100644 --- a/src/content/docs/aws/services/autoscaling.mdx +++ b/src/content/docs/aws/services/autoscaling.mdx @@ -33,9 +33,7 @@ awslocal ec2 create-launch-template \ --launch-template-data '{"ImageId":"ami-ff0fea8310f3","InstanceType":"t2.micro"}' ``` -The following output is displayed: - -```json +```bash title="Output" { "LaunchTemplate": { "LaunchTemplateId": "lt-5ccdf1a84f178ba44", @@ -79,9 +77,7 @@ Run the following command to describe the Auto Scaling group: awslocal autoscaling describe-auto-scaling-groups ``` -The following output is displayed: - -```json +```bash title="Output" { "AutoScalingGroups": [ { diff --git a/src/content/docs/aws/services/backup.mdx b/src/content/docs/aws/services/backup.mdx index 3bc44d16..f6261caa 100644 --- a/src/content/docs/aws/services/backup.mdx +++ b/src/content/docs/aws/services/backup.mdx @@ -34,9 +34,7 @@ awslocal backup create-backup-vault \ --backup-vault-name primary ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "BackupVaultName": "primary", "BackupVaultArn": "arn:aws:backup:us-east-1:000000000000:backup-vault:primary", @@ -79,9 +77,7 @@ awslocal backup create-backup-plan \ --backup-plan file://backup-plan.json ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "BackupPlanId": "9337aba3", "BackupPlanArn": "arn:aws:backup:us-east-1:000000000000:backup-plan:testplan", @@ -119,9 +115,8 @@ awslocal backup create-backup-selection \ ``` Replace the `--backup-plan-id` value with the `BackupPlanId` value from the output of the previous command. -The following output would be retrieved: -```bash +```bash title="Output" { "SelectionId": "91ce25f8", "BackupPlanId": "9337aba3", diff --git a/src/content/docs/aws/services/batch.mdx b/src/content/docs/aws/services/batch.mdx index cd5c7c0c..2766764e 100644 --- a/src/content/docs/aws/services/batch.mdx +++ b/src/content/docs/aws/services/batch.mdx @@ -41,9 +41,7 @@ awslocal iam create-role \ --assume-role-policy-document "{}" ``` -You should see the following output: - -```bash +```bash title="Output" { "Role": { "Path": "/", @@ -68,9 +66,7 @@ awslocal batch create-compute-environment \ --service-role ``` -You should see the following output: - -```bash +```bash title="Output" { "computeEnvironmentName": "myenv", "computeEnvironmentArn": "arn:aws:batch:us-east-1:000000000000:compute-environment/myenv" @@ -91,9 +87,7 @@ Run the following command to fetch the ARN of the compute environment: awslocal batch describe-compute-environments --compute-environments myenv ``` -You should see the following output: - -```bash +```bash title="Output" { "computeEnvironments": [ { @@ -120,9 +114,7 @@ awslocal batch create-job-queue \ --state ENABLED ``` -You should see the following output: - -```bash +```bash title="Output" { "jobQueueName": "myqueue", "jobQueueArn": "arn:aws:batch:us-east-1:000000000000:job-queue/myqueue" @@ -144,9 +136,7 @@ awslocal batch register-job-definition \ --container-properties '{"image":"busybox","vcpus":1,"memory":128,"command":["sleep","30"]}' ``` -You should see the following output: - -```bash +```bash title="Output" { "jobDefinitionName": "myjobdefn", "jobDefinitionArn": "arn:aws:batch:us-east-1:000000000000:job-definition/myjobdefn:1", @@ -181,9 +171,7 @@ awslocal batch submit-job \ --container-overrides '{"command":["sh", "-c", "sleep 5; pwd"]}' ``` -You should see the following output: - -```bash +```bash title="Output" { "jobName": "myjob", "jobId": "23027eb6-cce0-4365-a412-36917a2dfd03" diff --git a/src/content/docs/aws/services/bedrock.mdx b/src/content/docs/aws/services/bedrock.mdx index 046f9b01..65ca3b5e 100644 --- a/src/content/docs/aws/services/bedrock.mdx +++ b/src/content/docs/aws/services/bedrock.mdx @@ -123,9 +123,8 @@ awslocal bedrock create-model-invocation-job \ --output-data-config '{"s3OutputDataConfig": {"s3Uri": "s3://out-bucket"}}' ``` -The output will be: -```json +```bash title="Output" { "jobArn": "arn:aws:bedrock:us-east-1:000000000000:model-invocation-job/12345678" } @@ -181,4 +180,4 @@ Other models available with Ollama might also work, but are not officially suppo ## API Coverage - \ No newline at end of file + diff --git a/src/content/docs/aws/services/ce.mdx b/src/content/docs/aws/services/ce.mdx index 000b7559..35e6a83d 100644 --- a/src/content/docs/aws/services/ce.mdx +++ b/src/content/docs/aws/services/ce.mdx @@ -32,9 +32,7 @@ awslocal ce create-cost-category-definition --name test \ --rule-version "CostCategoryExpression.v1" --rules '[{"Value": "test", "Rule": {}, "Type": "REGULAR"}]' ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "CostCategoryArn": "arn:aws:ce::000000000000:costcategory/test" } @@ -48,9 +46,7 @@ awslocal ce describe-cost-category-definition \ --cost-category-arn arn:aws:ce::000000000000:costcategory/test ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "CostCategory": { "CostCategoryArn": "arn:aws:ce::000000000000:costcategory/test", @@ -83,9 +79,7 @@ awslocal ce create-anomaly-subscription --anomaly-subscription '{ }' ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "SubscriptionArn": "arn:aws:ce::000000000000:anomalysubscription/70644961" } @@ -98,9 +92,7 @@ Run the following command: awslocal ce get-anomaly-subscriptions ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "AnomalySubscriptions": [ { @@ -128,9 +120,7 @@ awslocal ce create-anomaly-monitor --anomaly-monitor '{ }' ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "MonitorArn": "arn:aws:ce::000000000000:anomalymonitor/22570ff3" } @@ -143,9 +133,7 @@ Run the following command: awslocal ce get-anomaly-monitors ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "AnomalyMonitors": [ { diff --git a/src/content/docs/aws/services/cloudtrail.mdx b/src/content/docs/aws/services/cloudtrail.mdx index 91961d45..8c4c6982 100644 --- a/src/content/docs/aws/services/cloudtrail.mdx +++ b/src/content/docs/aws/services/cloudtrail.mdx @@ -72,9 +72,7 @@ awslocal cloudtrail get-event-selectors \ --trail-name MyTrail ``` -The following output would be retrieved: - -```json +```bash title="Output" { "TrailARN": "arn:aws:cloudtrail:us-east-1:000000000000:trail/MyTrail", "EventSelectors": [ @@ -115,9 +113,7 @@ awslocal cloudtrail lookup-events \ --max-results 1 ``` -The following output would be retrieved: - -```json +```bash title="Output" { "Events": [{ "EventId": "218785bf-3ec4-4bdd-a055-57eca773294f", diff --git a/src/content/docs/aws/services/cloudwatch.mdx b/src/content/docs/aws/services/cloudwatch.mdx index 0fe19864..1600ee25 100644 --- a/src/content/docs/aws/services/cloudwatch.mdx +++ b/src/content/docs/aws/services/cloudwatch.mdx @@ -30,9 +30,7 @@ Run the following command to get the Log Group name: awslocal logs describe-log-groups ``` -The output should look similar to the following: - -```bash +```bash title="Output" { "logGroups": [ { @@ -61,9 +59,7 @@ awslocal logs describe-log-streams \ --log-group-name /aws/lambda/serverless-local-hello ``` -The output should look similar to the following: - -```bash +```bash title="Output" { "logStreams": [ { @@ -88,9 +84,7 @@ awslocal logs get-log-events \ --log-group-name '/aws/lambda/serverless-local-hello' --log-stream-name '2023/05/02/[$LATEST]853a59d0767cfaf10d6b29a6790d8b03' ``` -The output should look similar to the following: - -```bash +```bash title="Output" { "events": [ { diff --git a/src/content/docs/aws/services/codecommit.mdx b/src/content/docs/aws/services/codecommit.mdx index b67296d4..aefa313b 100644 --- a/src/content/docs/aws/services/codecommit.mdx +++ b/src/content/docs/aws/services/codecommit.mdx @@ -43,9 +43,7 @@ $ awslocal codecommit create-repository \ --tags Team=LocalStack ``` -If successful, the command will return the following output: - -```bash +```bash title="Output" { "repositoryMetadata": { "repositoryId": "", @@ -90,9 +88,7 @@ git commit -m "Add README.md" git push ``` -If successful, this command returns output similar to the following: - -```bash +```bash title="Output" ... To git://localhost:4510/localstack-repo * [new branch] main -> main diff --git a/src/content/docs/aws/services/codedeploy.mdx b/src/content/docs/aws/services/codedeploy.mdx index 00a6d43b..36f528db 100644 --- a/src/content/docs/aws/services/codedeploy.mdx +++ b/src/content/docs/aws/services/codedeploy.mdx @@ -32,9 +32,7 @@ Create an application with the [CreateApplication](https://docs.aws.amazon.com/c awslocal deploy create-application --application-name hello --compute-platform Server ``` -The output will be similar to the following: - -```json +```bash title="Output" { "applicationId": "063714b6-f438-4b90-bacb-ce04af7f5e83" } @@ -46,9 +44,7 @@ Make note of the application name, which can be used with other operations such awslocal deploy get-application --application-name hello ``` -The output will be similar to the following: - -```json +```bash title="Output" { "application": { "applicationId": "063714b6-f438-4b90-bacb-ce04af7f5e83", @@ -65,9 +61,7 @@ You can list all application using [ListApplications](https://docs.aws.amazon.co awslocal deploy list-applications ``` -The output will be similar to the following: - -```json +```bash title="Output" { "applications": [ "hello" @@ -87,9 +81,7 @@ awslocal deploy create-deployment-config --deployment-config-name hello-conf \ --minimum-healthy-hosts '{"type": "HOST_COUNT", "value": 1}' ``` -The output will be similar to the following: - -```json +```bash title="Output" { "deploymentConfigId": "0327ce0a-4637-4884-8899-49af7b9423b6" } @@ -101,9 +93,7 @@ The output will be similar to the following: awslocal deploy list-deployment-configs ``` -The output will be similar to the following: - -```json +```bash title="Output" { "deploymentConfigsList": [ "hello-conf" @@ -117,9 +107,7 @@ Use [GetDeploymentConfig](https://docs.aws.amazon.com/codedeploy/latest/APIRefer awslocal deploy get-deployment-config --deployment-config-name hello-conf ``` -The output will be similar to the following: - -```json +```bash title="Output" { "deploymentConfigInfo": { "deploymentConfigId": "0327ce0a-4637-4884-8899-49af7b9423b6", @@ -153,9 +141,7 @@ awslocal deploy create-deployment-group \ --deployment-group-name hello-group ``` -The output will be similar to the following: - -```json +```bash title="Output" { "deploymentGroupId": "09506586-9ba9-4005-a1be-840407abb39d" } @@ -167,9 +153,7 @@ List all deployment groups for an application with [ListDeploymentGroups](https: awslocal deploy list-deployment-groups --application-name hello ``` -The output will be similar to the following: - -```json +```bash title="Output" { "deploymentGroups": [ "hello-group" @@ -184,9 +168,7 @@ awslocal deploy get-deployment-group --application-name hello \ --deployment-group-name hello-group ``` -The output will be similar to the following: - -```json +```bash title="Output" { "deploymentGroupInfo": { "applicationName": "hello", @@ -224,9 +206,7 @@ awslocal deploy create-deployment \ --revision '{"revisionType": "S3", "s3Location": {"bucket": "placeholder", "key": "placeholder", "bundleType": "tar"}}' ``` -The output will be similar to the following: - -```json +```bash title="Output" { "deploymentId": "d-TU3TNCSTO" } @@ -238,9 +218,7 @@ List all deployments for an application with [ListDeployments](https://docs.aws. awslocal deploy list-deployments ``` -The output will be similar to the following: - -```json +```bash title="Output" { "deployments": [ "d-TU3TNCSTO" @@ -254,9 +232,7 @@ Get a deployment with [GetDeployment](https://docs.aws.amazon.com/codedeploy/lat awslocal deploy get-deployment --deployment-id d-TU3TNCSTO ``` -The output will be similar to the following: - -```json +```bash title="Output" { "deploymentInfo": { "applicationName": "hello", @@ -302,9 +278,7 @@ Stop a deployment with [StopDeployment](https://docs.aws.amazon.com/codedeploy/l awslocal deploy stop-deployment --deployment-id d-TU3TNCSTO ``` -The output will be similar to the following: - -```json +```bash title="Output" { "status": "Succeeded", "statusMessage": "Mock deployment stopped" diff --git a/src/content/docs/aws/services/codepipeline.mdx b/src/content/docs/aws/services/codepipeline.mdx index aa7fad6f..4dc362a8 100644 --- a/src/content/docs/aws/services/codepipeline.mdx +++ b/src/content/docs/aws/services/codepipeline.mdx @@ -13,7 +13,7 @@ CodePipeline can be used to create automated pipelines that handle the build, te LocalStack comes with a bespoke execution engine that can be used to create, manage, and execute pipelines. It supports a variety of actions that integrate with S3, CodeBuild, CodeConnections, and more. -The available operations can be found on the [API coverage]() page. +The available operations can be found on the [API coverage](#api-coverage) page. ## Getting started @@ -207,9 +207,7 @@ This can be confirmed using: awslocal codepipeline list-pipeline-executions --pipeline-name pipeline ``` -The output will be similar to the following: - -```json +```bash title="Output" { "pipelineExecutionSummaries": [ { @@ -257,9 +255,7 @@ This is useful when debugging the pipeline. awslocal codepipeline list-action-executions --pipeline-name pipeline ``` -The output will be similar to the following: - -```json +```bash title="Output" { "actionExecutionDetails": [ { @@ -366,9 +362,7 @@ awslocal codepipeline list-tags-for-resource \ --resource-arn arn:aws:codepipeline:eu-central-1:000000000000:pipeline ``` -The output will be similar to the following: - -```json +```bash title="Output" { "tags": [ { diff --git a/src/content/docs/aws/services/cognito.mdx b/src/content/docs/aws/services/cognito.mdx index 7b2fe192..4c2fcb58 100644 --- a/src/content/docs/aws/services/cognito.mdx +++ b/src/content/docs/aws/services/cognito.mdx @@ -32,9 +32,7 @@ The following command creates a user pool named `test`: awslocal cognito-idp create-user-pool --pool-name test ``` -You can see an output similar to the following: - -```json +```bash title="Output" "UserPool": { "Id": "us-east-1_fd924693e9b04f549f989283123a29c2", "Name": "test", @@ -100,9 +98,7 @@ Run the following command to create a user pool with a predefined ID: awslocal cognito-idp create-user-pool --pool-name p1 --user-pool-tags "_custom_id_=us-east-1_myid123" ``` -The output will be: - -```json +```bash title="Output" { "UserPool": { "Id": "myid123", @@ -116,9 +112,7 @@ You also have the possibility to create a Cognito user pool client with a predef awslocal cognito-idp create-user-pool-client --user-pool-id us-east-1_myid123 --client-name _custom_id_:myclient123 ``` -The output will be: - -```json +```bash title="Output" { "UserPoolClient": { "UserPoolId": "us-east-1_myid123", @@ -140,9 +134,7 @@ awslocal cognito-idp sign-up \ --user-attributes Name=email,Value= ``` -You can see an output similar to the following: - -```json +```bash title="Output" { "UserConfirmed": false, "UserSub": "5fdbe1d5-7901-4fee-9d1d-518103789c94" @@ -175,9 +167,7 @@ Run the following command to use the [`ListUsers`](https://docs.aws.amazon.com/c awslocal cognito-idp list-users --user-pool-id $pool_id ``` -The output will be similar to the following: - -```json +```bash title="Output" { "Users": [ { @@ -224,9 +214,7 @@ To access the JSON Web Key Sets (JWKS) configuration for each user pool, you can curl 'http://localhost:4566//.well-known/jwks.json' ``` -The output will be similar to the following: - -```json +```bash title="Output" {"keys": [{"kty": "RSA", "alg": "RS256", "use": "sig", "kid": "test-key", "n": "k6lrbEH..."]} ``` @@ -355,9 +343,7 @@ curl \ 'http://localhost:4566/_aws/cognito-idp/oauth2/token' ``` -The output will be similar to the following: - -```json +```bash title="Output" {"access_token": "eyJ0eXAi…lKaHx44Q", "expires_in": 86400, "token_type": "Bearer", "refresh_token": "e3f08304", "id_token": "eyJ0eXAi…ADTXv5mA"} ``` diff --git a/src/content/docs/aws/services/dms.mdx b/src/content/docs/aws/services/dms.mdx index b5d29683..344ef366 100644 --- a/src/content/docs/aws/services/dms.mdx +++ b/src/content/docs/aws/services/dms.mdx @@ -43,7 +43,7 @@ docker-compose up Now you can install the dependencies, deploy the resources, and run the tests: -```sh +```bash # install dependencies make install # deploys cdk stack with all required resources (replication instances, tasks, endpoints) diff --git a/src/content/docs/aws/services/docdb.mdx b/src/content/docs/aws/services/docdb.mdx index b5c3a6b5..ec2fb46d 100644 --- a/src/content/docs/aws/services/docdb.mdx +++ b/src/content/docs/aws/services/docdb.mdx @@ -24,9 +24,7 @@ awslocal docdb create-db-cluster \ --engine docdb ``` -The output will be similar to the following: - -```bash +```bash title="Output" { "DBCluster": { "DBClusterIdentifier": "test-docdb-cluster", @@ -76,9 +74,7 @@ awslocal docdb create-db-instance \ --db-cluster-identifier test-docdb-cluster ``` -The output will be similar to the following: - -```bash +```bash title="Output" { "DBInstance": { "DBInstanceIdentifier": "test-docdb-instance", @@ -130,9 +126,7 @@ awslocal docdb describe-db-clusters \ --db-cluster-identifier test-docdb-cluster ``` -The output will be similar to the following: - -```bash +```bash title="Output" { "DBClusters": [ { @@ -176,9 +170,7 @@ databases. mongosh mongodb://localhost:39045 ``` -The output will be similar to the following: - -```bash +```bash title="Output" Current Mongosh Log ID: 64a70b795697bcd4865e1b9a Connecting to: mongodb://localhost: 39045/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.10.1 @@ -336,7 +328,7 @@ awslocal lambda invoke \ The `outfile` contains the returned value, e.g.: -```json +```bash title="Output" {"statusCode":200,"body":"{\"_id\":\"6560a21ca7771a02ef128c72\",\"key\":\"value\"}"} ``` diff --git a/src/content/docs/aws/services/dynamodb.mdx b/src/content/docs/aws/services/dynamodb.mdx index cffcc3f8..7a9a8d5a 100644 --- a/src/content/docs/aws/services/dynamodb.mdx +++ b/src/content/docs/aws/services/dynamodb.mdx @@ -37,9 +37,7 @@ awslocal dynamodb create-table \ --region ap-south-1 ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "TableDescription": { "AttributeDefinitions": [ @@ -78,9 +76,7 @@ awslocal dynamodb update-table \ --region ap-south-1 ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "TableDescription": { "AttributeDefinitions": [ @@ -113,9 +109,7 @@ awslocal dynamodb list-tables \ --region eu-central-1 ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "TableNames": [ "global01" @@ -145,9 +139,7 @@ awslocal dynamodb describe-table \ --region ap-south-1 ``` -The following output would be retrieved: - -```bash +```bash title="Output" 1 ``` @@ -172,9 +164,7 @@ The response returns the number of deleted items: curl -X DELETE localhost:4566/_aws/dynamodb/expired ``` -The output will be: - -```json +```bash title="Output" {"ExpiredItems": 3} ``` diff --git a/src/content/docs/aws/services/dynamodbstreams.mdx b/src/content/docs/aws/services/dynamodbstreams.mdx index 437607cb..b90d927b 100644 --- a/src/content/docs/aws/services/dynamodbstreams.mdx +++ b/src/content/docs/aws/services/dynamodbstreams.mdx @@ -44,7 +44,7 @@ awslocal dynamodb create-table \ The `BarkTable` has a stream enabled which you can trigger by associating a Lambda function with the stream. You can notice that in the `LatestStreamArn` field of the response: -```bash +```bash title="Output" ... "LatestStreamArn": "arn:aws:dynamodb:000000000000:us-east-1:table/BarkTable/stream/timestamp ... @@ -149,7 +149,7 @@ awslocal lambda invoke \ In the `output.txt` file, you should see the following output: -```text +```bash title="Output" "Successfully processed 1 records." ``` @@ -177,7 +177,7 @@ awslocal lambda create-event-source-mapping \ Make sure to replace the `event-source` value with the stream ARN you obtained from the previous command. You should see the following output: -```bash +```bash title="Output" { "UUID": "7ae3426a-eda6-4c10-a596-100c59bd6787", ... @@ -210,7 +210,7 @@ awslocal dynamodbstreams list-streams The following output shows the list of streams: -```bash +```bash title="Output" { "Streams": [ { diff --git a/src/content/docs/aws/services/ec2.mdx b/src/content/docs/aws/services/ec2.mdx index a4091534..38da5e42 100644 --- a/src/content/docs/aws/services/ec2.mdx +++ b/src/content/docs/aws/services/ec2.mdx @@ -103,9 +103,7 @@ Run the following command to fetch the Security Group ID: awslocal ec2 describe-security-groups ``` -You should see the following output: - -```bash +```bash title="Output" { "SecurityGroups": [ { @@ -152,9 +150,7 @@ Run the following command to open the LocalStack logs: localstack logs ``` -You should see the following output: - -```bash +```bash title="Output" 2023-08-16T17:18:29.702 INFO --- [ asgi_gw_0] l.s.ec2.vmmanager.docker : Instance i-b07acefd77a3c415f will be accessible via SSH at: 127.0.0.1:12862, 172.17.0.4:22 2023-08-16T17:18:29.702 INFO --- [ asgi_gw_0] l.s.ec2.vmmanager.docker : Instance i-b07acefd77a3c415f port mappings (container -> host): {'8000/tcp': 29043, '22/tcp': 12862} ``` @@ -168,9 +164,7 @@ curl 172.17.0.4:8000 curl 127.0.0.1:29043 ``` -You should see the following output: - -```bash +```bash title="Output" @@ -334,7 +328,7 @@ awslocal ec2 describe-security-groups --group-names default The port mapping details are provided in the logs when the instance starts up. -```bash +```bash title="Output" 2022-12-20T19:43:44.544 INFO Instance i-1d6327abf04e31be6 port mappings (container -> host): {'8080/tcp': 51747, '22/tcp': 55705} ``` @@ -379,9 +373,7 @@ Once the instance is successfully started and initialized, we can first determin docker ps ``` -The output will be: - -```bash +```bash title="Output" CONTAINER ID IMAGE PORTS NAMES 5c60cf72d84a ...:ami-ff0fea8310f3 19419->22/tcp localstack-ec2... ``` @@ -392,9 +384,7 @@ You can then list the contents of the mounted filesystem `/ebs-mounted`, which s docker exec 5c60cf72d84a ls /ebs-mounted ``` -The output will be: - -```bash +```bash title="Output" my-test-file ``` @@ -484,9 +474,7 @@ To check CPU support for virtualization, run: kvm-ok ``` -The output will be: - -```bash +```bash title="Output" INFO: /dev/kvm exists KVM acceleration can be used ``` @@ -558,9 +546,7 @@ You may need run the following command to make sure the image is registered with virsh pool-refresh default ``` -The output will be: - -```bash +```bash title="Output" Pool default refreshed ``` @@ -570,9 +556,7 @@ You can then list the images with: virsh vol-list --pool default ``` -The output will be: - -```bash +```bash title="Output" Name Path -------------------------------------------------------------------------------------------------------- ami-1234abcd /var/lib/libvirt/images/ami-1234abcd @@ -610,9 +594,7 @@ To connect to the graphical display of the instance, first obtain the VNC addres virsh vncdisplay ``` -The output will be: - -```bash +```bash title="Output" 127.0.0.1:0 ``` @@ -638,7 +620,7 @@ Use the following configuration at `/etc/docker/daemon.json` on the host machine Then restart the Docker daemon: -```bash +```bash title="Output" sudo systemctl restart docker ``` From 6f61172482832b738fc6895b51b4e4c36755e0b5 Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Sun, 22 Jun 2025 06:55:05 +0530 Subject: [PATCH 2/3] do another bunch --- src/content/docs/aws/services/ecr.mdx | 12 ++--- src/content/docs/aws/services/ecs.mdx | 17 ++----- src/content/docs/aws/services/efs.mdx | 8 +--- src/content/docs/aws/services/eks.mdx | 46 +++++-------------- src/content/docs/aws/services/elasticache.mdx | 4 +- .../docs/aws/services/elasticbeanstalk.mdx | 12 ++--- .../docs/aws/services/elastictranscoder.mdx | 12 ++--- src/content/docs/aws/services/elb.mdx | 4 +- .../aws/services/elementalmediaconvert.mdx | 8 +--- src/content/docs/aws/services/emr.mdx | 2 +- src/content/docs/aws/services/es.mdx | 30 ++++-------- src/content/docs/aws/services/events.mdx | 2 +- src/content/docs/aws/services/firehose.mdx | 4 +- src/content/docs/aws/services/fis.mdx | 6 +-- src/content/docs/aws/services/glacier.mdx | 22 +++------ src/content/docs/aws/services/glue.mdx | 36 ++++----------- src/content/docs/aws/services/iam.mdx | 12 ++--- .../docs/aws/services/identitystore.mdx | 12 ++--- src/content/docs/aws/services/iot.mdx | 4 +- .../docs/aws/services/iotanalytics.mdx | 12 ++--- src/content/docs/aws/services/iotdata.mdx | 4 +- src/content/docs/aws/services/iotwireless.mdx | 12 ++--- src/content/docs/aws/services/kinesis.mdx | 8 +--- .../docs/aws/services/kinesisanalytics.mdx | 12 ++--- src/content/docs/aws/services/kms.mdx | 6 +-- 25 files changed, 88 insertions(+), 219 deletions(-) diff --git a/src/content/docs/aws/services/ecr.mdx b/src/content/docs/aws/services/ecr.mdx index f8362c54..79d8023e 100644 --- a/src/content/docs/aws/services/ecr.mdx +++ b/src/content/docs/aws/services/ecr.mdx @@ -64,9 +64,7 @@ You can run the following command to verify that the image was built successfull docker images ``` -You will see output similar to the following: - -```bash +```bash title="Output" REPOSITORY TAG IMAGE ID CREATED SIZE .. localstack-ecr-image latest 38883941b8fa 1 minute ago 185MB @@ -84,9 +82,7 @@ awslocal ecr create-repository \ --image-scanning-configuration scanOnPush=true ``` -You will see an output similar to the following: - -```bash +```bash title="Output" { "repository": { "repositoryArn": "arn:aws:ecr:us-east-1:000000000000:repository/localstack-ecr-repository", @@ -129,9 +125,7 @@ You can run the following command to verify that the image was pushed successful awslocal ecr list-images --repository-name localstack-ecr-repository ``` -You will see an output similar to the following: - -```bash +```bash title="Output" { "imageIds": [ { diff --git a/src/content/docs/aws/services/ecs.mdx b/src/content/docs/aws/services/ecs.mdx index 5871f7fd..9ec1e7ee 100644 --- a/src/content/docs/aws/services/ecs.mdx +++ b/src/content/docs/aws/services/ecs.mdx @@ -36,9 +36,7 @@ Execute the following command to create an ECS cluster named `mycluster`: awslocal ecs create-cluster --cluster-name mycluster ``` -The output will be: - -```json +```bash title="Output" { "cluster": { "clusterArn": "arn:aws:ecs:us-east-1:000000000000:cluster/mycluster", @@ -98,9 +96,7 @@ and then run the following command: awslocal ecs register-task-definition --cli-input-json file://task_definition.json ``` -The output will be: - -```json +```bash title="Output" { "taskDefinition": { "taskDefinitionArn": "arn:aws:ecs:us-east-1:000000000000:task-definition/myfamily:1", @@ -160,9 +156,7 @@ To create a service, execute the following command: awslocal ecs create-service --service-name myservice --cluster mycluster --task-definition myfamily --desired-count 1 ``` -The output will be: - -```json +```bash title="Output" { "service": { "serviceArn": "arn:aws:ecs:us-east-1:000000000000:service/mycluster/myservice", @@ -226,10 +220,7 @@ To access the generated logs from the container, run the following command: awslocal logs filter-log-events --log-group-name myloggroup --query 'events[].message' ``` -The output will be: - -```json -$ awslocal logs filter-log-events --log-group-name myloggroup | head -n 20 +```bash title="Output" { "events": [ { diff --git a/src/content/docs/aws/services/efs.mdx b/src/content/docs/aws/services/efs.mdx index 1b3db239..30116d17 100644 --- a/src/content/docs/aws/services/efs.mdx +++ b/src/content/docs/aws/services/efs.mdx @@ -35,9 +35,7 @@ awslocal efs create-file-system \ --tags Key=Name,Value=my-file-system ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "CreationToken": "53465731-0032-4cef-92f5-8aefe7c7b91e", "FileSystemId": "fs-34feac549e66b814", @@ -98,9 +96,7 @@ awslocal efs put-lifecycle-configuration \ --lifecycle-policies "{\"TransitionToIA\":\"AFTER_30_DAYS\"}" ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "LifecyclePolicies": [ { diff --git a/src/content/docs/aws/services/eks.mdx b/src/content/docs/aws/services/eks.mdx index 95fe1fe4..b409824c 100644 --- a/src/content/docs/aws/services/eks.mdx +++ b/src/content/docs/aws/services/eks.mdx @@ -39,9 +39,7 @@ awslocal eks create-cluster \ --resources-vpc-config "{}" ``` -You can see an output similar to the following: - -```bash +```bash title="Output" { "cluster": { "name": "cluster1", @@ -71,9 +69,7 @@ You can use the `docker` CLI to check that some containers have been created: docker ps ``` -The output will be: - -```bash +```bash title="Output" CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ... b335f7f089e4 rancher/k3d-proxy:5.0.1-rc.1 "/bin/sh -c nginx-pr…" 1 minute ago Up 1 minute 0.0.0.0:8081->80/tcp, 0.0.0.0:44959->6443/tcp k3d-cluster1-serverlb @@ -88,9 +84,7 @@ Run the following command: awslocal eks describe-cluster --name cluster1 ``` -The output will be: - -```json +```bash title="Output" { "cluster": { "name": "cluster1", @@ -145,9 +139,7 @@ Run the following command: awslocal ecr create-repository --repository-name "fancier-nginx" ``` -The output will be: - -```json +```bash title="Output" { "repository": { "repositoryArn": "arn:aws:ecr:us-east-1:000000000000:repository/fancier-nginx", @@ -194,9 +186,7 @@ awslocal eks update-kubeconfig --name cluster1 && \ kubectl config use-context arn:aws:eks:us-east-1:000000000000:cluster/cluster1 ``` -The output will be: - -```bash +```bash title="Output" ... Added new context arn:aws:eks:us-east-1:000000000000:cluster/cluster1 to /home/localstack/.kube/config Switched to context "arn:aws:eks:us-east-1:000000000000:cluster/cluster1". @@ -239,7 +229,7 @@ kubectl describe pod fancier-nginx In the events, we can see that the pull from ECR was successful: -```bash +```bash title="Output" Normal Pulled 10s kubelet Successfully pulled image "000000000000.dkr.ecr.us-east-1.localhost.localstack.cloud:4566/fancier-nginx:latest" in 2.412775896s ``` @@ -300,9 +290,7 @@ You will be able to send a request to `nginx` via the load balancer port `8081` curl http://localhost:8081/test123 ``` -The output will be: - -```bash +```bash title="Output" ...
nginx/1.21.6
@@ -379,9 +367,7 @@ You can create an EKS Cluster configuration using the following command: awslocal eks create-cluster --name cluster1 --role-arn arn:aws:iam::000000000000:role/eks-role --resources-vpc-config '{}' ``` -The output will be: - -```json +```bash title="Output" { "cluster": { "name": "cluster1", @@ -400,9 +386,7 @@ And check that it was created with: awslocal eks list-clusters ``` -The output will be: - -```json +```bash title="Output" { "clusters": [ "cluster1" @@ -487,9 +471,7 @@ This host-based routing mechanism ensures that each service is uniquely identifi curl http://eks-service-1.localhost.localstack.cloud:8081/v1 ``` -The output will be: - -```bash +```bash title="Output" ... [output of service 1] ``` @@ -497,9 +479,7 @@ The output will be: curl http://eks-service-2.localhost.localstack.cloud:8081/v1 ``` -The output will be: - -```bash +```bash title="Output" ... [output of service 2] ``` @@ -528,9 +508,7 @@ awslocal eks create-cluster \ --tags '{"_volume_mount_":"/path/on/host:/path/on/node"}' ``` -The output will be: - -```json +```bash title="Output" { "cluster": { "name": "cluster1", diff --git a/src/content/docs/aws/services/elasticache.mdx b/src/content/docs/aws/services/elasticache.mdx index 5c93f7d4..e256316c 100644 --- a/src/content/docs/aws/services/elasticache.mdx +++ b/src/content/docs/aws/services/elasticache.mdx @@ -41,9 +41,7 @@ Wait for it to be available, then you can use the cluster endpoint for Redis ope awslocal elasticache describe-cache-clusters --show-cache-node-info --query "CacheClusters[0].CacheNodes[0].Endpoint" ``` -The output will be: - -```json +```bash title="Output" { "Address": "localhost.localstack.cloud", "Port": 4510 diff --git a/src/content/docs/aws/services/elasticbeanstalk.mdx b/src/content/docs/aws/services/elasticbeanstalk.mdx index b86b78fa..63ef9821 100644 --- a/src/content/docs/aws/services/elasticbeanstalk.mdx +++ b/src/content/docs/aws/services/elasticbeanstalk.mdx @@ -32,9 +32,7 @@ awslocal elasticbeanstalk create-application \ --application-name my-app ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Application": { "ApplicationArn": "arn:aws:elasticbeanstalk:us-east-1:000000000000:application/my-app", @@ -63,9 +61,7 @@ awslocal elasticbeanstalk create-environment \ --environment-name my-environment ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "EnvironmentName": "my-environment", "EnvironmentId": "4fcae3fb", @@ -94,9 +90,7 @@ awslocal elasticbeanstalk create-application-version \ --version-label v1 ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ApplicationVersion": { "ApplicationVersionArn": "arn:aws:elasticbeanstalk:us-east-1:000000000000:applicationversion/my-app/v1", diff --git a/src/content/docs/aws/services/elastictranscoder.mdx b/src/content/docs/aws/services/elastictranscoder.mdx index 9503d9e8..4947dabe 100644 --- a/src/content/docs/aws/services/elastictranscoder.mdx +++ b/src/content/docs/aws/services/elastictranscoder.mdx @@ -45,9 +45,7 @@ awslocal elastictranscoder create-pipeline \ --role arn:aws:iam::000000000000:role/Elastic_Transcoder_Default_Role ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Pipeline": { "Id": "0998507242379-vltecz", @@ -85,9 +83,7 @@ Execute the following command to list all pipelines: awslocal elastictranscoder list-pipelines ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Pipelines": [ { @@ -126,9 +122,7 @@ Execute the following command to read the pipeline with the ID `0998507242379-vl awslocal elastictranscoder read-pipeline --id 0998507242379-vltecz ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Pipeline": { "Id": "0998507242379-vltecz", diff --git a/src/content/docs/aws/services/elb.mdx b/src/content/docs/aws/services/elb.mdx index a3440021..3903c9ec 100644 --- a/src/content/docs/aws/services/elb.mdx +++ b/src/content/docs/aws/services/elb.mdx @@ -111,9 +111,7 @@ Finally, you can issue an HTTP request to the `DNSName` parameter of `CreateLoad curl example-lb.elb.localhost.localstack.cloud:4566 ``` -The following output will be retrieved: - -```bash +```bash title="Output" { "host": { "hostname": "example-lb.elb.localhost.localstack.cloud", diff --git a/src/content/docs/aws/services/elementalmediaconvert.mdx b/src/content/docs/aws/services/elementalmediaconvert.mdx index 840de48b..cd059351 100644 --- a/src/content/docs/aws/services/elementalmediaconvert.mdx +++ b/src/content/docs/aws/services/elementalmediaconvert.mdx @@ -103,9 +103,7 @@ Execute the following command to create a job using a `job.json` file: awslocal mediaconvert create-job --cli-input-json file://job.json ``` -The following output would be retrieved: - -```json +```bash title="Output" { "Job": { "AccelerationSettings": { @@ -164,9 +162,7 @@ awslocal mediaconvert create-queue --description "High priority queue for video encoding" ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Queue": { "Arn": "arn:aws:mediaconvert:us-east-1:000000000000:queues/MyQueue", diff --git a/src/content/docs/aws/services/emr.mdx b/src/content/docs/aws/services/emr.mdx index c3d1e1c1..27ef62eb 100644 --- a/src/content/docs/aws/services/emr.mdx +++ b/src/content/docs/aws/services/emr.mdx @@ -40,7 +40,7 @@ awslocal emr create-cluster \ You will see a response similar to the following: -```bash +```bash title="Output" { "ClusterId": "j-A2KF3EKLAOWRI" } diff --git a/src/content/docs/aws/services/es.mdx b/src/content/docs/aws/services/es.mdx index 4c82cc1c..d77bf9e2 100644 --- a/src/content/docs/aws/services/es.mdx +++ b/src/content/docs/aws/services/es.mdx @@ -24,9 +24,7 @@ Unless you use the Elasticsearch default version, the first time you create a cl awslocal es create-elasticsearch-domain --domain-name my-domain ``` -The following output would be retrieved: - -```json +```bash title="Output" { "DomainStatus": { "DomainId": "000000000000/my-domain", @@ -79,9 +77,7 @@ and after some time, you should see that the `Processing` state of the domain is awslocal es describe-elasticsearch-domain --domain-name my-domain | jq ".DomainStatus.Processing" ``` -The following output would be retrieved: - -```bash +```bash title="Output" false ``` @@ -97,9 +93,7 @@ For example: curl http://my-domain.us-east-1.es.localhost.localstack.cloud:4566 ``` -The following output would be retrieved: - -```json +```bash title="Output" { "name" : "localstack", "cluster_name" : "elasticsearch", @@ -125,9 +119,7 @@ Or the health endpoint: curl -s http://my-domain.us-east-1.es.localhost.localstack.cloud:4566/_cluster/health | jq . ``` -The following output would be retrieved: - -```json +```bash title="Output" { "cluster_name": "elasticsearch", "status": "green", @@ -177,7 +169,7 @@ awslocal es create-elasticsearch-domain --domain-name my-domain \ Once the domain processing is complete, you can access the cluster: -```bash +```bash title="Output" curl http://localhost:4566/my-custom-endpoint/_cluster/health ``` @@ -279,9 +271,7 @@ volumes: --elasticsearch-cluster-config '{ "InstanceType": "m3.xlarge.elasticsearch", "InstanceCount": 4, "DedicatedMasterEnabled": true, "ZoneAwarenessEnabled": true, "DedicatedMasterType": "m3.xlarge.elasticsearch", "DedicatedMasterCount": 3}' ``` - The following output would be retrieved: - - ```json + ```bash title="Output" { "DomainStatus": { "DomainId": "000000000000/mylogs-2", @@ -323,9 +313,7 @@ volumes: curl mylogs-2.us-east-1.es.localhost.localstack.cloud:4566/_cluster/health ``` - The following output would be retrieved: - - ```bash + ```bash title="Output" {"cluster_name":"es-docker-cluster","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":0,"active_shards":0,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0,"delayed_unassigned_shards":0,"number_of_pending_tasks":0,"number_of_in_flight_fetch":0,"task_max_waiting_in_queue_millis":0,"active_shards_percent_as_number":100.0}[~] ``` @@ -334,9 +322,7 @@ volumes: curl -X PUT mylogs-2.us-east-1.es.localhost.localstack.cloud:4566/my-index ``` - The following output would be retrieved: - - ```bash + ```bash title="Output" {"acknowledged":true,"shards_acknowledged":true,"index":"my-index"} ``` diff --git a/src/content/docs/aws/services/events.mdx b/src/content/docs/aws/services/events.mdx index a98853c8..31436e92 100644 --- a/src/content/docs/aws/services/events.mdx +++ b/src/content/docs/aws/services/events.mdx @@ -123,7 +123,7 @@ awslocal logs describe-log-streams \ Alternatively, you can fetch LocalStack logs to verify the Lambda invocation: -```bash +```bash title="Output" localstack logs ... 2023-07-17T09:37:52.028 INFO --- [ asgi_gw_0] localstack.request.aws : AWS lambda.Invoke => 202 diff --git a/src/content/docs/aws/services/firehose.mdx b/src/content/docs/aws/services/firehose.mdx index 91c81bb9..cceab1b8 100644 --- a/src/content/docs/aws/services/firehose.mdx +++ b/src/content/docs/aws/services/firehose.mdx @@ -81,7 +81,7 @@ awslocal firehose create-delivery-stream \ On successful execution, the command will return the `DeliveryStreamARN` of the created delivery stream: -```json +```bash title="Output" { "DeliveryStreamARN": "arn:aws:firehose:us-east-1:000000000000:deliverystream/activity-to-elasticsearch-local" } @@ -133,7 +133,7 @@ curl -s http://es-local.us-east-1.es.localhost.localstack.cloud:443/activity/_se You will get an output similar to the following: -```json +```bash title="Output" [ { "_index": "activity", diff --git a/src/content/docs/aws/services/fis.mdx b/src/content/docs/aws/services/fis.mdx index ceade149..1491c54b 100644 --- a/src/content/docs/aws/services/fis.mdx +++ b/src/content/docs/aws/services/fis.mdx @@ -95,7 +95,7 @@ awslocal fis create-experiment-template --cli-input-json file://create-experimen The following output would be retrieved: -```json +```bash title="Output" { "experimentTemplate": { "id": "ad16589a-4a91-4aee-88df-c33446605882", @@ -154,9 +154,7 @@ Run the following command and specify the ID of the experiment template you crea awslocal fis start-experiment --experiment-template-id ad16589a-4a91-4aee-88df-c33446605882 ``` -The following output would be retrieved: - -```json +```bash title="Output" { "experiment": { "id": "efee7c02-8733-4d7c-9628-1b60bbec9759", diff --git a/src/content/docs/aws/services/glacier.mdx b/src/content/docs/aws/services/glacier.mdx index d6cf725f..aa7f8287 100644 --- a/src/content/docs/aws/services/glacier.mdx +++ b/src/content/docs/aws/services/glacier.mdx @@ -42,9 +42,7 @@ Run the following command to describe your vault. awslocal glacier describe-vault --vault-name sample-vault --account-id - ``` -On successful creation of the Glacier vault, you will see the following output: - -```bash +```bash title="Output" { "VaultARN": "arn:aws:glacier:us-east-1:000000000000:vaults/sample-vault", "VaultName": "sample-vault", @@ -65,9 +63,7 @@ Run the following command to upload the file to your Glacier vault: awslocal glacier upload-archive --vault-name sample-vault --account-id - --body image.jpg ``` -On successful upload of the Glacier archive, you will see the following output: - -```bash +```bash title="Output" { "location": "/000000000000/vaults/sample-vault/archives/d41d8cd98f00b204e9800998ecf8427e", "checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", @@ -88,9 +84,7 @@ awslocal glacier initiate-job \ --job-parameters '{"Type":"archive-retrieval","ArchiveId":"d41d8cd98f00b204e9800998ecf8427e"}' ``` -On successful execution of the job, you will see the following output: - -```bash +```bash title="Output" { "location": "//vaults/sample-vault/jobs/25CEOTJ7ZUR5Q7YY0B1O55AE4C3L1502EOHWMNY10IIYEBWEQB73D23S8BVYO9RTRTPLRK2LJLUCCRM52GDV87C9A4JW", "jobId": "25CEOTJ7ZUR5Q7YY0B1O55AE4C3L1502EOHWMNY10IIYEBWEQB73D23S8BVYO9RTRTPLRK2LJLUCCRM52GDV87C9A4JW" @@ -105,9 +99,7 @@ You can list the current and previous processes, called Jobs, to monitor the req awslocal glacier list-jobs --vault-name sample-vault --account-id - ``` -On successful execution of the command, you will see the following output: - -```bash +```bash title="Output" { "JobList": [ { @@ -160,9 +152,7 @@ awslocal glacier initiate-job \ --job-parameters '{"Type":"inventory-retrieval","ArchiveId":"d41d8cd98f00b204e9800998ecf8427e"}' ``` -On successful execution of the command, you will see the following output: - -```bash +```bash title="Output" { "location": "//vaults/sample-vault/jobs/P5972CSWFR803BHX48OD1A7JWNBFJUMYVWCMZWY55ZJPIJMG1XWFV9ISZPZH1X3LBF0UV3UG6ORETM0EHE5R86Z47B1F", "jobId": "P5972CSWFR803BHX48OD1A7JWNBFJUMYVWCMZWY55ZJPIJMG1XWFV9ISZPZH1X3LBF0UV3UG6ORETM0EHE5R86Z47B1F" @@ -181,7 +171,7 @@ awslocal glacier get-job-output \ Inspecting the content of the `inventory.json` file, we can find an inventory of the vault: -```json +```json title="inventory.json" { "VaultARN": "arn:aws:glacier:us-east-1:000000000000:vaults/sample-vault", "InventoryDate": "2023-09-11T17:20:48.000Z", diff --git a/src/content/docs/aws/services/glue.mdx b/src/content/docs/aws/services/glue.mdx index 9f4505b3..c6943866 100644 --- a/src/content/docs/aws/services/glue.mdx +++ b/src/content/docs/aws/services/glue.mdx @@ -52,9 +52,7 @@ awslocal glue create-table --database db1 --table-input '{"Name":"table1"}' awslocal glue get-tables --database db1 ``` -You should see the following output: - -```json +```bash title="Output" { "TableList": [ { @@ -115,9 +113,7 @@ The returned `JobRunId` can be used to query the status job the job execution, u awslocal glue get-job-run --job-name job1 --run-id ``` -You should see the following output: - -```json +```bash title="Output" { "JobRun": { "Id": "733b76d0", @@ -154,9 +150,7 @@ You can query the databases with the `get-databases` operation: awslocal glue get-databases ``` -You should see the following output: - -```json +```bash title="Output" { "DatabaseList": [ ... @@ -178,9 +172,7 @@ And you can query the databases with the `get-databases` operation: awslocal glue get-tables --database-name db2 ``` -You should see the following output: - -```json +```bash title="Output" { "TableList": [ { @@ -239,9 +231,7 @@ Finally, you can query the table metadata that has been created by the crawler: awslocal glue get-tables --database-name db1 ``` -You should see the following output: - -```json +```bash title="Output" { "TableList": [{ "Name": "table1", @@ -256,9 +246,7 @@ You can also query the created table partitions: awslocal glue get-partitions --database-name db1 --table-name table1 ``` -You should see the following output: - -```json +```bash title="Output" { "Partitions": [{ "Values": ["2021", "Jan", "1"], @@ -285,7 +273,7 @@ awslocal redshift create-cluster \ The output of this command contains the endpoint address of the created Redshift database: -```json +```bash title="Output" ... "Endpoint": { "Address": "localhost.localstack.cloud", @@ -345,9 +333,7 @@ awslocal glue create-schema --schema-name demo-schema \ --schema-definition '{"type":"record","namespace":"Demo","name":"Person","fields":[{"name":"Name","type":"string"}]}' ``` -You should see the following output: - -```json +```bash title="Output" { "RegistryName": "demo-registry", "RegistryArn": "arn:aws:glue:us-east-1:000000000000:file-registry/demo-registry", @@ -372,9 +358,7 @@ awslocal glue register-schema-version \ --schema-definition '{"type":"record","namespace":"Demo","name":"Person","fields":[{"name":"Name","type":"string"}, {"name":"Address","type":"string"}]}' ``` -You should see the following output: - -```json +```bash title="Output" { "SchemaVersionId": "ee38732b-b299-430d-a88b-4c429d9e1208", "VersionNumber": 2, @@ -439,7 +423,7 @@ Retrieve the job run ID from the output of the `start-job-run` command. The execution of the Glue job can take a few moments - once the job has finished executing, you should see a log line with the query results in the LocalStack container logs, similar to the output below: -```text +```bash title="Output" 2023-10-17 12:59:20,088 INFO scheduler.DAGScheduler: Job 15 finished: collect at /private/tmp/script-90e5371e.py:28, took 0,158257 s SQL result: ['{"name":"test1","key":123}', '{"name":"test2","key":456}'] ``` diff --git a/src/content/docs/aws/services/iam.mdx b/src/content/docs/aws/services/iam.mdx index ff3ffb6f..ee7ec367 100644 --- a/src/content/docs/aws/services/iam.mdx +++ b/src/content/docs/aws/services/iam.mdx @@ -31,9 +31,7 @@ Run the following command to use the [`GetCallerIdentity`](https://docs.aws.amaz awslocal sts get-caller-identity ``` -You can see an output similar to the following: - -```bash +```bash title="Output" { "UserId": "AKIAIOSFODNN7EXAMPLE", "Account": "000000000000", @@ -55,9 +53,7 @@ Run the following command: awslocal iam create-access-key --user-name test ``` -You can see an output similar to the following: - -```bash +```bash title="Output" { "AccessKey": { "UserName": "test", @@ -78,9 +74,7 @@ export AWS_ACCESS_KEY_ID=LKIAQAAAAAAAGFWKCM5F AWS_SECRET_ACCESS_KEY=DUulXk2N2yD6 awslocal sts get-caller-identity ``` -You can see an output similar to the following: - -```bash +```bash title="Output" { "UserId": "b2yxf5g824zklfx5ry8o", "Account": "000000000000", diff --git a/src/content/docs/aws/services/identitystore.mdx b/src/content/docs/aws/services/identitystore.mdx index 31ad46a9..7871abf7 100644 --- a/src/content/docs/aws/services/identitystore.mdx +++ b/src/content/docs/aws/services/identitystore.mdx @@ -31,9 +31,7 @@ Execute the following command to create a group with an identity store ID of `te awslocal identitystore create-group --identity-store-id testls ``` -You can see an output similar to the following: - -```bash +```bash title="Output" { "GroupId": "38cec731-de22-45bf-9af7-b74457bba884", "IdentityStoreId": "testls" @@ -51,9 +49,7 @@ Run the following command to list all groups using the [`ListGroups`](https://do awslocal identitystore list-groups --identity-store-id testls ``` -You can see an output similar to the following: - -```bash +```bash title="Output" { "Groups": [ { @@ -76,9 +72,7 @@ Run the following command to describe the group you created in the previous step awslocal describe-group --identity-store-id testls --group-id 38cec731-de22-45bf-9af7-b74457bba884 ``` -You can see an output similar to the following: - -```bash +```bash title="Output" { "GroupId": "38cec731-de22-45bf-9af7-b74457bba884", "ExternalIds": [], diff --git a/src/content/docs/aws/services/iot.mdx b/src/content/docs/aws/services/iot.mdx index 3f180b5a..47589106 100644 --- a/src/content/docs/aws/services/iot.mdx +++ b/src/content/docs/aws/services/iot.mdx @@ -28,9 +28,9 @@ To retrieve the MQTT endpoint, use the [`DescribeEndpoint`](https://docs.aws.ama awslocal iot describe-endpoint ``` -You can see an output similar to the following: -```bash + +```bash title="Output" { "endpointAddress": "000000000000.iot.eu-central-1.localhost.localstack.cloud:4510" } diff --git a/src/content/docs/aws/services/iotanalytics.mdx b/src/content/docs/aws/services/iotanalytics.mdx index b2424747..deb54912 100644 --- a/src/content/docs/aws/services/iotanalytics.mdx +++ b/src/content/docs/aws/services/iotanalytics.mdx @@ -41,9 +41,7 @@ You can use the [`DescribeChannel`](https://docs.aws.amazon.com/iotanalytics/lat awslocal iotanalytics describe-channel --channel-name mychannel ``` -The following output is displayed: - -```json +```bash title="Output" { "channel": { "name": "mychannel", @@ -67,9 +65,7 @@ You can use the [`DescribeDatastore`](https://docs.aws.amazon.com/iotanalytics/l awslocal iotanalytics describe-datastore --datastore-name mydatastore ``` -The following output is displayed: - -```json +```bash title="Output" { "datastore": { "name": "mydatastore", @@ -116,9 +112,7 @@ You can use the [`DescribePipeline`](https://docs.aws.amazon.com/iotanalytics/la awslocal iotanalytics describe-pipeline --pipeline-name mypipeline ``` -The following output is displayed: - -```json +```bash title="Output" { "pipeline": { "name": "mypipeline" diff --git a/src/content/docs/aws/services/iotdata.mdx b/src/content/docs/aws/services/iotdata.mdx index e87cd41b..6863c4a4 100644 --- a/src/content/docs/aws/services/iotdata.mdx +++ b/src/content/docs/aws/services/iotdata.mdx @@ -35,7 +35,7 @@ awslocal iot-data update-thing-shadow \ The `output.txt` file contains the following output: -```json +```text title="output.txt" { "state": { "reported": { @@ -80,7 +80,7 @@ awslocal iot-data delete-thing-shadow \ The `output.txt` will contain the following output: -```json +```text title="output.txt" { "version": 1, "timestamp": 1724226371 diff --git a/src/content/docs/aws/services/iotwireless.mdx b/src/content/docs/aws/services/iotwireless.mdx index ea030c5d..d89e167d 100644 --- a/src/content/docs/aws/services/iotwireless.mdx +++ b/src/content/docs/aws/services/iotwireless.mdx @@ -32,7 +32,7 @@ awslocal iotwireless create-device-profile The following output would be retrieved: -```bash +```bash title="Output" { "Id": "b8a8e3a8" } @@ -47,7 +47,7 @@ awslocal iotwireless list-device-profiles The following output would be retrieved: -```json +```bash title="Output" { "DeviceProfileList": [ { @@ -69,7 +69,7 @@ awslocal iotwireless create-wireless-device \ The `input.json` file contains the following content: -```json +```json title="input.json" { "Description": "My LoRaWAN wireless device", "DestinationName": "IoTWirelessDestination", @@ -97,7 +97,7 @@ awslocal iotwireless list-wireless-devices The following output would be retrieved: -```json +```bash title="Output" { "WirelessDeviceList": [ { @@ -127,7 +127,7 @@ awslocal iotwireless create-wireless-gateway \ The following output would be retrieved: -```json +```bash title="Output" { "Id": "e519dc4e" } @@ -142,7 +142,7 @@ awslocal iotwireless list-wireless-gateways The following output would be retrieved: -```json +```bash title="Output" { "WirelessGatewayList": [ { diff --git a/src/content/docs/aws/services/kinesis.mdx b/src/content/docs/aws/services/kinesis.mdx index c971c9e4..c1c7ea2e 100644 --- a/src/content/docs/aws/services/kinesis.mdx +++ b/src/content/docs/aws/services/kinesis.mdx @@ -53,9 +53,7 @@ awslocal lambda create-function \ --role arn:aws:iam::000000000000:role/lambda-kinesis-role ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "FunctionName": "ProcessKinesisRecords", "FunctionArn": "arn:aws:lambda:us-east-1:000000000000:function:ProcessKinesisRecords", @@ -122,9 +120,7 @@ awslocal kinesis describe-stream \ --stream-name lambda-stream ``` -The following output would be retrieved: - -```json +```bash title="Output" { "StreamDescription": { "Shards": [ diff --git a/src/content/docs/aws/services/kinesisanalytics.mdx b/src/content/docs/aws/services/kinesisanalytics.mdx index b6b6735c..9c12d1d7 100644 --- a/src/content/docs/aws/services/kinesisanalytics.mdx +++ b/src/content/docs/aws/services/kinesisanalytics.mdx @@ -35,9 +35,7 @@ awslocal kinesisanalytics create-application \ --application-name test-analytics-app ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ApplicationSummary": { "ApplicationName": "test-analytics-app", @@ -56,9 +54,7 @@ awslocal kinesisanalytics describe-application \ --application-name test-analytics-app ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ApplicationDetail": { "ApplicationName": "test-analytics-app", @@ -91,9 +87,7 @@ awslocal kinesisanalytics list-tags-for-resource \ --resource-arn arn:aws:kinesisanalytics:us-east-1:000000000000:application/test-analytics-app ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Tags": [ { diff --git a/src/content/docs/aws/services/kms.mdx b/src/content/docs/aws/services/kms.mdx index 40f61a8b..486d335c 100644 --- a/src/content/docs/aws/services/kms.mdx +++ b/src/content/docs/aws/services/kms.mdx @@ -119,7 +119,7 @@ awslocal kms create-key --tags '[{"TagKey":"_custom_id_","TagValue":"00000000-00 The following output will be displayed: -```json +```bash title="Output" { "KeyMetadata": { "AWSAccountId": "000000000000", @@ -141,7 +141,7 @@ echo 'dGhpc2lzYXNlY3VyZWtleQ==' | base64 -d The following output will be displayed: -```text +```bash title="Output" thisisasecurekey ``` @@ -153,7 +153,7 @@ awslocal kms create-key --tags '[{"TagKey":"_custom_key_material_","TagValue":"d The following output will be displayed: -```json +```bash title="Output" { "KeyMetadata": { "AWSAccountId": "000000000000", From 54f245fc23c9411e942ca74077f1bbbbbd60d088 Mon Sep 17 00:00:00 2001 From: HarshCasper Date: Sun, 22 Jun 2025 07:30:35 +0530 Subject: [PATCH 3/3] finish the rest --- .../docs/aws/services/lakeformation.mdx | 4 +- src/content/docs/aws/services/lambda.mdx | 26 ++----- .../docs/aws/services/managedblockchain.mdx | 12 +--- src/content/docs/aws/services/mediastore.mdx | 12 +--- src/content/docs/aws/services/memorydb.mdx | 4 +- src/content/docs/aws/services/mq.mdx | 11 +-- src/content/docs/aws/services/msk.mdx | 16 ++--- src/content/docs/aws/services/mwaa.mdx | 8 ++- src/content/docs/aws/services/neptune.mdx | 8 +-- src/content/docs/aws/services/opensearch.mdx | 10 +-- src/content/docs/aws/services/pca.mdx | 30 ++------ src/content/docs/aws/services/pinpoint.mdx | 26 ++----- src/content/docs/aws/services/pipes.mdx | 8 +-- src/content/docs/aws/services/qldb.mdx | 38 +++------- src/content/docs/aws/services/rds.mdx | 12 +--- src/content/docs/aws/services/route53.mdx | 24 ++----- .../docs/aws/services/route53resolver.mdx | 24 ++----- src/content/docs/aws/services/s3.mdx | 18 ++--- src/content/docs/aws/services/sagemaker.mdx | 4 +- src/content/docs/aws/services/scheduler.mdx | 12 +--- .../docs/aws/services/secretsmanager.mdx | 12 +--- .../docs/aws/services/serverlessrepo.mdx | 4 +- .../docs/aws/services/servicediscovery.mdx | 6 +- src/content/docs/aws/services/ses.mdx | 11 +-- src/content/docs/aws/services/shield.mdx | 11 +-- src/content/docs/aws/services/sns.mdx | 70 ++++++------------- src/content/docs/aws/services/sqs.mdx | 36 +++++----- src/content/docs/aws/services/ssm.mdx | 11 +-- .../docs/aws/services/stepfunctions.mdx | 18 ++--- src/content/docs/aws/services/sts.mdx | 20 ++---- src/content/docs/aws/services/support.mdx | 11 +-- src/content/docs/aws/services/swf.mdx | 10 ++- src/content/docs/aws/services/textract.mdx | 11 +-- src/content/docs/aws/services/timestream.mdx | 4 +- src/content/docs/aws/services/transcribe.mdx | 8 +-- src/content/docs/aws/services/transfer.mdx | 2 +- .../docs/aws/services/verifiedpermissions.mdx | 10 ++- src/content/docs/aws/services/waf.mdx | 12 +--- src/content/docs/aws/services/xray.mdx | 8 +-- .../aws/tooling/localstack-sdks/python-sdk.md | 10 +-- ...credit-scoring-with-localstack-snowpark.md | 10 +-- 41 files changed, 185 insertions(+), 417 deletions(-) diff --git a/src/content/docs/aws/services/lakeformation.mdx b/src/content/docs/aws/services/lakeformation.mdx index 9858fe3a..ead058c7 100644 --- a/src/content/docs/aws/services/lakeformation.mdx +++ b/src/content/docs/aws/services/lakeformation.mdx @@ -55,9 +55,7 @@ Execute the following command to list the resources: awslocal lakeformation list-resources ``` -The following output is displayed: - -```bash +```bash title="Output" { "ResourceInfoList": [ { diff --git a/src/content/docs/aws/services/lambda.mdx b/src/content/docs/aws/services/lambda.mdx index f63d37bc..b2760b91 100644 --- a/src/content/docs/aws/services/lambda.mdx +++ b/src/content/docs/aws/services/lambda.mdx @@ -123,9 +123,7 @@ awslocal lambda create-function-url-config \ --auth-type NONE ``` -The following output would be retrieved: - -```json +```bash title="Output" { "FunctionUrl": "http://my-custom-subdomain.lambda-url....", .... @@ -141,9 +139,7 @@ awslocal lambda create-function-url-config \ --qualifier test-alias ``` -The following output would be retrieved: - -```json +```bash title="Output" { "FunctionUrl": "http://my-custom-subdomain-test-alias.lambda-url....", .... @@ -162,9 +158,7 @@ curl -X POST \ -d '{"num1": "10", "num2": "10"}' ``` -The following output would be retrieved: - -```sh +```bash title="Output" The product of 10 and 10 is 100% ``` @@ -479,7 +473,7 @@ We then used the [`CreateFunction` API](https://docs.aws.amazon.com/lambda/lates To test our Lambda function and see the output from the Lambda Layer, we can invoke the function and check the logs (with `DEBUG=1` enabled). Here's an example: -```shell +```bash title="Output" > START RequestId: a8bc4ce6-e2e8-189e-cf58-c2eb72827c23 Version: $LATEST > Output from Lambda layer util function > Debug output from Lambda function @@ -673,9 +667,7 @@ If you receive a `ResourceConflictException` when trying to invoke a function, i awslocal lambda get-function --function-name my-function ``` -The output will be similar to the following: - -```bash +```bash title="Output" An error occurred (ResourceConflictException) when calling the Invoke operation (reached max retries: 0): The operation cannot be performed at this time. The function is currently in the following state: Pending @@ -693,9 +685,7 @@ Alternatively, you can check the function state using the [`GetFunction` API](ht awslocal lambda get-function --function-name my-function ``` -The output will be similar to the following: - -```json +```bash title="Output" { "Configuration": { ... @@ -714,9 +704,7 @@ When the function is active, the output will be similar to the following: awslocal lambda get-function --function-name my-function ``` -The output will be similar to the following: - -```json +```bash title="Output" { "Configuration": { ... diff --git a/src/content/docs/aws/services/managedblockchain.mdx b/src/content/docs/aws/services/managedblockchain.mdx index 7dc8df65..b9858530 100644 --- a/src/content/docs/aws/services/managedblockchain.mdx +++ b/src/content/docs/aws/services/managedblockchain.mdx @@ -67,9 +67,7 @@ awslocal managedblockchain create-network \ }' ``` -The output will be similar to the following: - -```json +```bash title="Output" { "NetworkId": "n-X24AF1AK2GC6MDW11HYW5I5DQC", "MemberId": "m-6VWBWHP2Y15F7TQ2DS093RTCW2" @@ -107,9 +105,7 @@ awslocal managedblockchain create-node \ --member-id m-6VWBWHP2Y15F7TQ2DS093RTCW2 ``` -The output will be similar to the following: - -```json +```bash title="Output" { "NodeId": "nd-77K8AI0O5BEQD1IW4L8OGKMXV7" } @@ -129,9 +125,7 @@ awslocal managedblockchain create-proposal \ --member-id m-6VWBWHP2Y15F7TQ2DS093RTCW2 ``` -The output will be similar to the following: - -```json +```bash title="Output" { "ProposalId": "p-NK0PSLDPETJQX01Q4OLBRHP8CZ" } diff --git a/src/content/docs/aws/services/mediastore.mdx b/src/content/docs/aws/services/mediastore.mdx index 085a97cb..df57e081 100644 --- a/src/content/docs/aws/services/mediastore.mdx +++ b/src/content/docs/aws/services/mediastore.mdx @@ -31,9 +31,7 @@ Run the following command to create a container and retrieve the the `Endpoint` awslocal mediastore create-container --container-name mycontainer ``` -You should see the following output: - -```bash +```bash title="Output" { "Container": { "Endpoint": "http://mediastore-mycontainer.mediastore.localhost.localstack.cloud:4566", @@ -59,9 +57,7 @@ awslocal mediastore-data put-object \ --content-type binary/octet-stream ``` -You should see the following output: - -```bash +```bash title="Output" { "ContentSHA256": "", "ETag": "\"111d787cdcfcc358fd15684131f586d8\"" @@ -82,9 +78,7 @@ awslocal mediastore-data get-object \ /tmp/out.txt ``` -You should see the following output: - -```bash +```bash title="Output" { "ContentLength": "716", "ContentType": "binary/octet-stream", diff --git a/src/content/docs/aws/services/memorydb.mdx b/src/content/docs/aws/services/memorydb.mdx index 8da72c78..765150b1 100644 --- a/src/content/docs/aws/services/memorydb.mdx +++ b/src/content/docs/aws/services/memorydb.mdx @@ -40,9 +40,7 @@ Run the following command to retrieve the cluster endpoint using the [`DescribeC awslocal memorydb describe-clusters --query "Clusters[0].ClusterEndpoint" ``` -The output will be similar to the following: - -```json +```bash title="Output" { "Address": "127.0.0.1", "Port": 36739 diff --git a/src/content/docs/aws/services/mq.mdx b/src/content/docs/aws/services/mq.mdx index 3f8824c7..7ff21224 100644 --- a/src/content/docs/aws/services/mq.mdx +++ b/src/content/docs/aws/services/mq.mdx @@ -39,9 +39,7 @@ awslocal mq create-broker \ --users='{"ConsoleAccess": true, "Groups": ["testgroup"],"Password": "QXwV*$iUM9USHnVv&!^7s3c@", "Username": "admin"}' ``` -The output will be similar to the following: - -```json +```bash title="Output" { "BrokerArn": "arn:aws:mq:us-east-1:000000000000:broker:test-broker:b-f503abb7-66bc-47fb-b1a9-8d8c51ef6545", "BrokerId": "b-f503abb7-66bc-47fb-b1a9-8d8c51ef6545" @@ -54,13 +52,10 @@ You can use the [`DescribeBroker`](https://docs.aws.amazon.com/amazon-mq/latest/ Run the following command to get information about the broker we created above: ```bash -awslocal mq describe-broker --broker-id +awslocal mq describe-broker --broker-id b-f503abb7-66bc-47fb-b1a9-8d8c51ef6545 ``` -The output will be similar to the following: - -```json -b-f503abb7-66bc-47fb-b1a9-8d8c51ef6545 +```bash title="Output" { "BrokerArn": "arn:aws:mq:us-east-1:000000000000:broker:test-broker:b-f503abb7-66bc-47fb-b1a9-8d8c51ef6545", "BrokerId": "b-f503abb7-66bc-47fb-b1a9-8d8c51ef6545", diff --git a/src/content/docs/aws/services/msk.mdx b/src/content/docs/aws/services/msk.mdx index ebf358a8..4081df2d 100644 --- a/src/content/docs/aws/services/msk.mdx +++ b/src/content/docs/aws/services/msk.mdx @@ -30,7 +30,7 @@ To set up a local MSK (Managed Streaming for Apache Kafka) cluster, you can use In this process, you'll need a JSON file named `brokernodegroupinfo.json` which specifies the three subnets where you want your local Amazon MSK to distribute the broker nodes. Create the file and add the following content to it: -```json +```bash title="Output" { "InstanceType": "kafka.m5.xlarge", "BrokerAZDistribution": "DEFAULT", @@ -52,9 +52,7 @@ awslocal kafka create-cluster \ --number-of-broker-nodes 3 ``` -The output of the command looks similar to this: - -```bash +```bash title="Output" { "ClusterArn": "arn:aws:kafka:us-east-1:000000000000:cluster/EventsCluster/b154d18a-8ecb-4691-96b2-50348357fc2f-25", "ClusterName": "EventsCluster", @@ -71,9 +69,7 @@ awslocal kafka describe-cluster \ --cluster-arn "arn:aws:kafka:us-east-1:000000000000:cluster/EventsCluster/b154d18a-8ecb-4691-96b2-50348357fc2f-25" ``` -The output of the command looks similar to this: - -```bash +```bash title="Output" { "ClusterInfo": { "BrokerNodeGroupInfo": { @@ -122,9 +118,7 @@ bin/kafka-topics.sh \ --topic LocalMSKTopic ``` -After executing the command, your output should resemble the following: - -```bash +```bash title="Output" Created topic LocalMSKTopic. ``` @@ -212,7 +206,7 @@ awslocal lambda create-event-source-mapping \ Upon successful completion of the operation to create the Lambda Event Source Mapping, you can expect the following response: -```bash +```bash title="Output" { "UUID": "9c353a2b-bc1a-48b5-95a6-04baf67f01e4", "StartingPosition": "LATEST", diff --git a/src/content/docs/aws/services/mwaa.mdx b/src/content/docs/aws/services/mwaa.mdx index 9742950f..9d1e3cf8 100644 --- a/src/content/docs/aws/services/mwaa.mdx +++ b/src/content/docs/aws/services/mwaa.mdx @@ -51,13 +51,15 @@ The Airflow UI can be accessed via the URL in the `WebserverUrl` attribute of th The username and password are always set to `localstack`. ```bash -awslocal mwaa get-environment --name my-mwaa-env --query Environment.WebserverUrl -"http://localhost.localstack.cloud:4510" +awslocal mwaa get-environment \ + --name my-mwaa-env \ + --query Environment.WebserverUrl \ + "http://localhost.localstack.cloud:4510" ``` LocalStack also prints this information in the logs: -```bash +```bash title="Output" 2024-03-06T14:54:47.070 INFO --- [functhread10] l.services.mwaa.provider : Airflow environment 'my-mwaa-env' available at http://localhost.localstack.cloud:4510 with username 'localstack' and password 'localstack' ``` diff --git a/src/content/docs/aws/services/neptune.mdx b/src/content/docs/aws/services/neptune.mdx index 62f1af03..dc272739 100644 --- a/src/content/docs/aws/services/neptune.mdx +++ b/src/content/docs/aws/services/neptune.mdx @@ -58,9 +58,7 @@ awslocal neptune create-db-cluster \ --db-cluster-identifier my-neptune-db ``` -You should see the following output: - -```json +```bash title="Output" { "DBCluster": { ... @@ -194,9 +192,7 @@ Use the Python package [awscurl](https://pypi.org/project/awscurl/) to make your awscurl "https://localhost.localstack.cloud:4510/gremlin?gremlin=g.V().count()" -H "Accept: application/json" | jq . ``` -The output will be similar to the following: - -```json +```bash title="Output" { "requestId": "729c3e7b-50b3-4df7-b0b6-d1123c4e81df", "status": { diff --git a/src/content/docs/aws/services/opensearch.mdx b/src/content/docs/aws/services/opensearch.mdx index 50bc9c7b..a7f9c565 100644 --- a/src/content/docs/aws/services/opensearch.mdx +++ b/src/content/docs/aws/services/opensearch.mdx @@ -76,9 +76,7 @@ You can verify that the cluster is up and running by checking the cluster health curl -s http://my-domain.us-east-1.opensearch.localhost.localstack.cloud:4566/_cluster/health | jq . ``` -The following output will be visible on your terminal: - -```json +```bash title="Output" { "cluster_name": "opensearch", "status": "green", @@ -173,7 +171,7 @@ IAM support is also not yet available. A secure OpenSearch domain can be spawned with this example CLI input. Save it in a file named `opensearch_domain.json`. -```json +```json title="opensearch_domain.json" { "DomainName": "secure-domain", "ClusterConfig": { @@ -220,9 +218,7 @@ Once the domain setup is complete (`Processing: false`), the cluster can only be curl -u 'admin:really-secure-passwordAa!1' http://secure-domain.us-east-1.opensearch.localhost.localstack.cloud:4566/_cluster/health ``` -The following output will be visible on your terminal: - -```json +```bash title="Output" {"cluster_name":"opensearch","status":"green",...} ``` diff --git a/src/content/docs/aws/services/pca.mdx b/src/content/docs/aws/services/pca.mdx index 11156fcf..db005452 100644 --- a/src/content/docs/aws/services/pca.mdx +++ b/src/content/docs/aws/services/pca.mdx @@ -40,9 +40,7 @@ awslocal acm-pca create-certificate-authority \ --certificate-authority-type "ROOT" ``` -The output will be similar to the following: - -```json +```bash title="Output" { "CertificateAuthorityArn": "arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff" } @@ -58,9 +56,7 @@ awslocal acm-pca describe-certificate-authority \ --certificate-authority-arn arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff ``` -The output will be similar to the following: - -```json +```bash title="Output" { "CertificateAuthority": { "Arn": "arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff", @@ -113,9 +109,7 @@ awslocal acm-pca issue-certificate \ --certificate-authority-arn arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff ``` -The output will be similar to the following: - -```json +```bash title="Output" { "CertificateArn": "arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff/certificate/17ef7bbf3cc6471ba3ef0707119b8392" } @@ -134,8 +128,6 @@ awslocal acm-pca get-certificate \ --output text | tee cert.pem ``` -The output will be similar to the following: - ```bash awslocal acm-pca import-certificate-authority-certificate \ --certificate-authority-arn arn:aws:acm-pca:eu-central-1:000000000000:certificate-authority/0b20353f-ce7a-4de4-9b82-e06903a893ff \ @@ -152,9 +144,7 @@ awslocal acm-pca describe-certificate-authority \ --output text ``` -The output will be: - -```bash +```bash title="Output" ACTIVE ``` @@ -180,9 +170,7 @@ It should resemble the illustrated output. openssl req -in local-csr.pem -text -noout ``` -The output will be similar to the following: - -```bash +```bash title="Output" Certificate Request: Data: Version: 1 (0x0) @@ -231,9 +219,7 @@ In the following command, `local-cert.pem` refers to the end-entity certificate openssl verify -CAfile cert.pem local-cert.pem ``` -The output will be: - -```bash +```bash title="Output" local-cert.pem: OK ``` @@ -258,9 +244,7 @@ awslocal acm-pca list-tags \ --max-results 10 ``` -The output will be similar to the following: - -```json +```bash title="Output" { "Tags": [ { diff --git a/src/content/docs/aws/services/pinpoint.mdx b/src/content/docs/aws/services/pinpoint.mdx index f0149160..7960bf4e 100644 --- a/src/content/docs/aws/services/pinpoint.mdx +++ b/src/content/docs/aws/services/pinpoint.mdx @@ -38,9 +38,7 @@ awslocal pinpoint create-app \ --create-application-request Name=ExampleCorp,tags={"Stack"="Test"} ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ApplicationResponse": { "Arn": "arn:aws:mobiletargeting:us-east-1:000000000000:apps/4487a55ac6fb4a2699a1b90727c978e7", @@ -60,9 +58,7 @@ Execute the following command: awslocal pinpoint get-apps ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ApplicationsResponse": { "Item": [ @@ -88,9 +84,7 @@ awslocal pinpoint list-tags-for-resource \ ``` Replace the `resource-arn` with the ARN of the application you created earlier. -The following output would be retrieved: - -```bash +```bash title="Output" { "TagsModel": { "tags": { @@ -127,9 +121,7 @@ awslocal pinpoint send-otp-message \ }' ``` -The output will be similar to the following: - -```json +```bash title="Output" { "MessageResponse": { "ApplicationId": "fff5a801e01643c18a13a763e22a8fbf" @@ -143,9 +135,7 @@ You can use the debug endpoint `/_aws/pinpoint//` curl http://localhost:4566/_aws/pinpoint/fff5a801e01643c18a13a763e22a8fbf/liftoffcampaign | jq . ``` -The output will be similar to the following: - -```json +```bash title="Output" { "AllowedAttempts": 3, "BrandName": "LocalStack Community", @@ -163,7 +153,7 @@ The output will be similar to the following: The OTP code is also printed in an `INFO` level message in the LocalStack log output: -```text +```bash title="Output" 2024-10-17T11:08:24.044 INFO : OTP for application ID fff5a801e01643c18a13a763e22a8fbf reference ID liftoffcampaign: 655745 ``` @@ -179,9 +169,7 @@ awslocal pinpoint verify-otp-message \ }' ``` -The output will be similar to the following: - -```json +```bash title="Output" { "VerificationResponse": { "Valid": true diff --git a/src/content/docs/aws/services/pipes.mdx b/src/content/docs/aws/services/pipes.mdx index 3714240b..bc5b140e 100644 --- a/src/content/docs/aws/services/pipes.mdx +++ b/src/content/docs/aws/services/pipes.mdx @@ -60,9 +60,7 @@ awslocal pipes create-pipe --name sample-pipe \ --role-arn arn:aws:iam::000000000000:role/pipes-role ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Arn": "arn:aws:pipes:us-east-1:000000000000:pipe/sample-pipe", "CreationTime": "2024-01-26T11:55:27.069088+05:30", @@ -81,9 +79,7 @@ You can use the [`DescribePipe`](https://docs.aws.amazon.com/eventbridge/latest/ awslocal pipes describe-pipe --name sample-pipe ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Arn": "arn:aws:pipes:us-east-1:000000000000:pipe/sample-pipe", "CreationTime": "2024-01-26T11:55:27.069088+05:30", diff --git a/src/content/docs/aws/services/qldb.mdx b/src/content/docs/aws/services/qldb.mdx index a9441236..53920642 100644 --- a/src/content/docs/aws/services/qldb.mdx +++ b/src/content/docs/aws/services/qldb.mdx @@ -60,9 +60,7 @@ journals of transactions. awslocal qldb create-ledger --name vehicle-registration --permissions-mode ALLOW_ALL ``` -The output will be similar to the following: - -```bash +```bash title="Output" { "Name": "vehicle-registration", "Arn": "arn:aws:qldb:us-east-1:000000000000:ledger/vehicle-registration", @@ -112,9 +110,7 @@ various data manipulation tasks using familiar SQL-like syntax. qldb> CREATE TABLE VehicleRegistration ``` -The output will be: - -```bash +```bash title="Output" { information_schema: { user_tables: [ @@ -157,9 +153,7 @@ qldb> INSERT INTO VehicleRegistration VALUE } ``` -The output will be: - -```bash +```bash title="Output" { documentId: "3TYR9BamzyqHWBjYOfHegE" } @@ -174,9 +168,7 @@ The table can be interrogated based on the inserted registration number: qldb> SELECT * FROM VehicleRegistration WHERE RegNum=1722 ``` -The output will be: - -```bash +```bash title="Output" { 'VIN' : 'KM8SRDHF6EU074761', 'RegNum' : 1722, @@ -209,7 +201,7 @@ qldb> UPDATE VehicleRegistration AS r SET r.Owners.PrimaryOwner.PersonId = '1122 The command will return the updated document ID. -```bash +```bash title="Output" { documentId: "3TYR9BamzyqHWBjYOfHegE" } @@ -222,9 +214,7 @@ The next step is to check on the updates made to the `PersonId` field of the `Pr qldb> SELECT r.Owners FROM VehicleRegistration AS r WHERE r.VIN = 'KM8SRDHF6EU074761' ``` -The output will be: - -```bash +```bash title="Output" { Owners: { PrimaryOwner: { @@ -254,9 +244,7 @@ First the unique `id` of the document must be found. qldb> SELECT r_id FROM VehicleRegistration AS r BY r_id WHERE r.VIN = 'KM8SRDHF6EU074761' ``` -The output will be: - -```bash +```bash title="Output" { r_id: "3TYR9BamzyqHWBjYOfHegE" } @@ -270,9 +258,7 @@ Then, the `id` is used to query the history function. qldb> SELECT h.data.VIN, h.data.City, h.data.Owners FROM history(VehicleRegistration) AS h WHERE h.metadata.id = '3TYR9BamzyqHWBjYOfHegE' ``` -The output will be: - -```bash +```bash title="Output" { VIN: "KM8SRDHF6EU074761", City: "Kent", @@ -320,9 +306,7 @@ to an error message. awslocal qldb delete-ledger --name vehicle-registration ``` -The output will be: - -```bash +```bash title="Output" An error occurred (ResourcePreconditionNotMetException) when calling the DeleteLedger operation: Preventing deletion of ledger vehicle-registration with DeletionProtection enabled ``` @@ -333,9 +317,7 @@ This can be adjusted using the `update-ledger` command in the AWS CLI to remove awslocal qldb update-ledger --name vehicle-registration --no-deletion-protection ``` -The output will be: - -```bash +```bash title="Output" { "Name": "vehicle-registration", "Arn": "arn:aws:qldb:us-east-1:000000000000:ledger/vehicle-registration", diff --git a/src/content/docs/aws/services/rds.mdx b/src/content/docs/aws/services/rds.mdx index 679aa9b5..e40e9ff4 100644 --- a/src/content/docs/aws/services/rds.mdx +++ b/src/content/docs/aws/services/rds.mdx @@ -52,9 +52,7 @@ awslocal rds create-db-cluster \ --master-user-password mypassword ``` -You should see the following output: - -```json +```bash title="Output" { "DBCluster": { ... @@ -103,9 +101,7 @@ awslocal secretsmanager create-secret \ --secret-string file://mycreds.json ``` -You should see the following output: - -```json +```bash title="Output" { "ARN": "arn:aws:secretsmanager:us-east-1:000000000000:secret:dbpass-cfnAX", "Name": "dbpass", @@ -130,9 +126,7 @@ awslocal rds-data execute-statement \ --include-result-metadata --sql 'SELECT 123' ``` -You should see the following output: - -```json +```bash title="Output" { "columnMetadata": [ { diff --git a/src/content/docs/aws/services/route53.mdx b/src/content/docs/aws/services/route53.mdx index 0347adc2..809701aa 100644 --- a/src/content/docs/aws/services/route53.mdx +++ b/src/content/docs/aws/services/route53.mdx @@ -43,9 +43,7 @@ zone_id=$(awslocal route53 create-hosted-zone \ echo $zone_id ``` -The following output would be retrieved: - -```bash +```bash title="Output" /hostedzone/WBCZ6F10CWV9J1G ``` @@ -60,9 +58,7 @@ awslocal route53 change-resource-record-sets \ --change-batch 'Changes=[{Action=CREATE,ResourceRecordSet={Name=test.example.com,Type=A,ResourceRecords=[{Value=1.2.3.4}]}}]' ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ChangeInfo": { "Id": "/change/C2682N5HXP0BZ4", @@ -88,9 +84,7 @@ You can query the DNS record using `dig` via the built-in DNS server by running dig @localhost test.example.com ``` -The following output would be retrieved: - -```bash +```bash title="Output" ;; QUESTION SECTION: ;test.example.com. IN A @@ -123,9 +117,7 @@ zone_id=$(awslocal route53 create-hosted-zone \ echo $zone_id ``` -The following output would be retrieved: - -```bash +```bash title="Output" /hostedzone/3NF6SEGOB5EBHS1 ``` @@ -138,9 +130,7 @@ awslocal route53 change-resource-record-sets \ --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"}]}}]}' ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ChangeInfo": { "Id": "/change/C2682N5HXP0BZ4", @@ -157,9 +147,7 @@ dig @127.0.0.1 bucket1.s3.localhost.localstack.cloud dig @127.0.0.1 localhost.localstack.cloud ``` -The following output would be retrieved: - -```bash +```bash title="Output" ... ;; ANSWER SECTION: bucket1.s3.localhost.localstack.cloud. 300 IN A 127.0.0.1 diff --git a/src/content/docs/aws/services/route53resolver.mdx b/src/content/docs/aws/services/route53resolver.mdx index caadd99f..c438fce9 100644 --- a/src/content/docs/aws/services/route53resolver.mdx +++ b/src/content/docs/aws/services/route53resolver.mdx @@ -37,9 +37,7 @@ Fetch the default VPC's security group ID using the following command: awslocal ec2 describe-subnets --filters Name=vpc-id,Values=$VPC_ID --query 'Subnets[].SubnetId' ``` -You should see the following output: - -```bash +```bash title="Output" [ "subnet-bdd58a47", "subnet-957d6ba6", @@ -56,9 +54,7 @@ Choose two subnets from the list above and fetch the CIDR block of the subnets w awslocal ec2 describe-subnets --subnet-ids subnet-957d6ba6 --query 'Subnets[*].CidrBlock' ``` -The following output would be retrieved: - -```bash +```bash title="Output" [ "172.31.16.0/20" ] @@ -70,9 +66,7 @@ Similarly, fetch the CIDR block of the subnet `subnet-bdd58a47`: awslocal ec2 describe-subnets --subnet-ids subnet-bdd58a47 --query 'Subnets[*].CidrBlock' ``` -The following output would be retrieved: - -```bash +```bash title="Output" [ "172.31.0.0/20" ] @@ -87,9 +81,7 @@ awslocal ec2 describe-security-groups \ --query 'SecurityGroups[0].GroupId' ``` -The following output would be retrieved: - -```bash +```bash title="Output" sg-39936e572e797b360 ``` @@ -134,9 +126,7 @@ awslocal route53resolver create-resolver-endpoint \ --cli-input-json file://create-outbound-resolver-endpoint.json ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ResolverEndpoint": { "Id": "rslvr-out-5d61abaff9de06b99", @@ -166,9 +156,7 @@ Run the following command: awslocal route53resolver list-resolver-endpoints ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ResolverEndpoints": [ { diff --git a/src/content/docs/aws/services/s3.mdx b/src/content/docs/aws/services/s3.mdx index 0ae665f5..1343276b 100644 --- a/src/content/docs/aws/services/s3.mdx +++ b/src/content/docs/aws/services/s3.mdx @@ -40,9 +40,7 @@ Run the following command to list your S3 buckets: awslocal s3api list-buckets ``` -On successful creation of the S3 bucket, you will see the following output: - -```bash +```bash title="Output" { "Buckets": [ { @@ -80,7 +78,7 @@ awslocal s3api list-objects \ If your image has been uploaded successfully, you will see the following output: -```bash +```bash title="Output" { "Contents": [ { @@ -104,9 +102,7 @@ Run the following command to upload a file named `index.html` to your S3 bucket: awslocal s3api put-object --bucket sample-bucket --key index.html --body index.html ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"" } @@ -176,9 +172,7 @@ Run the following command on your terminal to create your S3 bucket: awslocal s3api create-bucket --bucket cors-bucket ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Location": "/cors-bucket" } @@ -187,7 +181,7 @@ The following output would be retrieved: Next, create a JSON file with the CORS configuration. The file should have the following format: -```json +```json title="cors-config.json" { "CORSRules": [ { @@ -223,7 +217,7 @@ Your S3 bucket is configured to allow cross-origin resource sharing, and if you However, if you try to access your bucket from [LocalStack Web Application](https://app.localstack.cloud), you'll see errors, and your bucket won't be accessible anymore. We can edit the JSON file `cors-config.json` you created earlier with the following configuration and save it: -```json +```json title="cors-config.json" { "CORSRules": [ { diff --git a/src/content/docs/aws/services/sagemaker.mdx b/src/content/docs/aws/services/sagemaker.mdx index cf0d9d13..84216c5b 100644 --- a/src/content/docs/aws/services/sagemaker.mdx +++ b/src/content/docs/aws/services/sagemaker.mdx @@ -71,9 +71,7 @@ Run the sample application by executing the following command: python3 main.py ``` -You should see the following output: - -```bash +```bash title="Output" Creating bucket... Uploading model data to bucket... Creating model in SageMaker... diff --git a/src/content/docs/aws/services/scheduler.mdx b/src/content/docs/aws/services/scheduler.mdx index f84f9ce2..1ac13126 100644 --- a/src/content/docs/aws/services/scheduler.mdx +++ b/src/content/docs/aws/services/scheduler.mdx @@ -55,9 +55,7 @@ awslocal scheduler create-schedule \ --flexible-time-window '{ "Mode": "OFF"}' ``` -The following output is displayed: - -```bash +```bash title="Output" { "ScheduleArn": "arn:aws:scheduler:us-east-1:000000000000:schedule/default/sqs-templated-schedule" } @@ -72,9 +70,7 @@ Run the following command to list all schedules: awslocal scheduler list-schedules ``` -The following output is displayed: - -```bash +```bash title="Output" { "Schedules": [ { @@ -110,9 +106,7 @@ Run the following command to list the tags associated with a schedule: awslocal scheduler list-tags-for-resource \ --resource-arn arn:aws:scheduler:us-east-1:00000000 -The following output is displayed: - -```bash +```bash title="Output" { "Tags": [ { diff --git a/src/content/docs/aws/services/secretsmanager.mdx b/src/content/docs/aws/services/secretsmanager.mdx index c03d3c1f..df4a1ded 100644 --- a/src/content/docs/aws/services/secretsmanager.mdx +++ b/src/content/docs/aws/services/secretsmanager.mdx @@ -50,9 +50,7 @@ awslocal secretsmanager create-secret \ Upon successful execution, the output will provide you with the ARN of the newly created secret. This identifier will be useful for further operations or integrations. -The following output would be retrieved: - -```bash +```bash title="Output" { "ARN": "arn:aws:secretsmanager:us-east-1:000000000000:secret:test-secret-pyfjVP", "Name": "test-secret", @@ -70,9 +68,7 @@ awslocal secretsmanager describe-secret \ --secret-id test-secret ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ARN": "arn:aws:secretsmanager:us-east-1:000000000000:secret:test-secret-pyfjVP", "Name": "test-secret", @@ -105,9 +101,7 @@ awslocal secretsmanager get-secret-value \ --secret-id test-secret ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "ARN": "arn:aws:secretsmanager:us-east-1:000000000000:secret:test-secret-pyfjVP", "Name": "test-secret", diff --git a/src/content/docs/aws/services/serverlessrepo.mdx b/src/content/docs/aws/services/serverlessrepo.mdx index 0067a84c..785ebd36 100644 --- a/src/content/docs/aws/services/serverlessrepo.mdx +++ b/src/content/docs/aws/services/serverlessrepo.mdx @@ -40,7 +40,7 @@ Add a Metadata section to your SAM template file (`template.yaml`), and specify To create a deployment package and a packaged SAM template using the `samlocal` CLI, add a Metadata section to your SAM template file (`template.yaml`) and specify the desired properties: -```yaml +```yaml title="template.yaml" Metadata: AWS::ServerlessRepo::Application: Name: helloworld @@ -62,7 +62,7 @@ samlocal package \ This command generates a `packaged.yaml` file in the current directory containing the packaged SAM template. The packaged template will be similar to the original template file, but it will now include a `CodeUri` property for the Lambda function, as shown in the example below: -```yaml +```yaml title="packaged.yaml" Resources: HelloWorldFunction: Type: AWS::Serverless::Function diff --git a/src/content/docs/aws/services/servicediscovery.mdx b/src/content/docs/aws/services/servicediscovery.mdx index d887db70..a8646c2e 100644 --- a/src/content/docs/aws/services/servicediscovery.mdx +++ b/src/content/docs/aws/services/servicediscovery.mdx @@ -82,7 +82,7 @@ awslocal ecs create-cluster \ Next, you will register a task definition that's compatible with Fargate. Create a file named `fargate-task.json` and add the following content: -```json +```json title="fargate-task.json" { "family": "tutorial-task-def", "networkMode": "awsvpc", @@ -157,7 +157,7 @@ Make a note of the `GroupId` and `SubnetId` values. Create a new file named `ecs-service-discovery.json` and add the following content to it: -```json +```json title="ecs-service-discovery.json" { "cluster": "tutorial", "serviceName": "ecs-service-discovery", @@ -221,9 +221,7 @@ The following examples demonstrate how to use filters with these operations: ```bash awslocal servicediscovery list-namespaces \ --filters "Name=HTTP_NAME,Values=['example-namespace'],Condition=EQ" -``` -```bash awslocal servicediscovery list-services \ --filters "Name=NAMESPACE_ID,Values=['id_to_match']" ``` diff --git a/src/content/docs/aws/services/ses.mdx b/src/content/docs/aws/services/ses.mdx index 5d696b54..aa1bba3a 100644 --- a/src/content/docs/aws/services/ses.mdx +++ b/src/content/docs/aws/services/ses.mdx @@ -35,6 +35,9 @@ A singular email identity can be added using the `VerifyEmailIdentity` operation awslocal ses verify-email-identity --email hello@example.com awslocal ses list-identities +``` + +```bash title="Output" { "Identities": [ "hello@example.com" @@ -56,9 +59,7 @@ awslocal ses send-email \ --destination 'ToAddresses=jeff@aws.com' ``` -The following output is displayed: - -```bash +```bash title="Output" { "MessageId": "labpqxukegeaftfh-ymaouvvy-ribr-qeoy-izfp-kxaxbfcfsgbh-wpewvd" } @@ -81,9 +82,9 @@ Sent messages can be retrieved in following ways: curl --silent localhost.localstack.cloud:4566/_aws/ses?email=hello@example.com | jq . ``` - The following output is displayed: + - ```bash + ```bash title="Output" { "messages": [ { diff --git a/src/content/docs/aws/services/shield.mdx b/src/content/docs/aws/services/shield.mdx index 1ed52bb9..4e448268 100644 --- a/src/content/docs/aws/services/shield.mdx +++ b/src/content/docs/aws/services/shield.mdx @@ -33,9 +33,7 @@ awslocal shield create-protection \ --resource-arn "arn:aws:elasticloadbalancing:us-east-1:000000000000:loadbalancer/app/my-alb/1234567890" ``` -The output should look similar to the following: - -```bash +```bash title="Output" { "ProtectionId": "67908d33-16c0-443d-820a-31c02c4d5976" } @@ -50,9 +48,7 @@ The following command lists all Shield protections: awslocal shield list-protections ``` -The output should look similar to the following: - -```bash +```bash title="Output" { "Protections": [ { @@ -76,9 +72,8 @@ awslocal shield describe-protection \ ``` Replace the protection ID with the ID of the protection you want to describe. -The output should look similar to the following: -```bash +```bash title="Output" { "Protection": { "Id": "67908d33-16c0-443d-820a-31c02c4d5976", diff --git a/src/content/docs/aws/services/sns.mdx b/src/content/docs/aws/services/sns.mdx index fd3fa6de..77a1ede0 100644 --- a/src/content/docs/aws/services/sns.mdx +++ b/src/content/docs/aws/services/sns.mdx @@ -102,9 +102,7 @@ First we need to ensure we create an SQS queue named `my-queue`: awslocal sqs create-queue --queue-name my-queue ``` -The following output is displayed: - -```bash +```bash title="Output" { "QueueUrl": "http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/my-queue" } @@ -119,9 +117,7 @@ awslocal sns subscribe \ --notification-endpoint "arn:aws:sqs:us-east-1:000000000000:my-queue" ``` -The following output is displayed: - -```bash +```bash title="Output" { "SubscriptionArn": "arn:aws:sns:us-east-1:000000000000:localstack-topic:636e2a73-0dda-4e09-9fdf-77f113d0edd8" } @@ -143,9 +139,7 @@ awslocal sqs receive-message \ --queue-url "http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/my-queue" ``` -The following output is displayed: - -```bash +```bash title="Output" { "Messages": [ { @@ -166,9 +160,7 @@ Run the following command to list all the SNS subscriptions: awslocal sns list-subscriptions ``` -The following output is displayed: - -```bash +```bash title="Output" { "Subscriptions": [ { @@ -228,9 +220,7 @@ awslocal sns create-platform-application \ --attributes {} ``` -An example response is shown below: - -```json +```bash title="Output" { "PlatformApplicationArn": "arn:aws:sns:us-east-1:000000000000:app/APNS/app-test" } @@ -244,9 +234,9 @@ awslocal sns create-platform-endpoint \ --token my-fake-token ``` -The following output is displayed: -```json + +```bash title="Output" { "EndpointArn": "arn:aws:sns:us-east-1:000000000000:endpoint/APNS/app-test/c25f353e-856b-4b02-a725-6bde35e6e944" } @@ -261,9 +251,9 @@ awslocal sns publish \ --message-structure json ``` -The following output is displayed: -```json + +```bash title="Output" { "MessageId": "ed501a7a-caab-45aa-a941-2fcc64b5c227" } @@ -275,9 +265,9 @@ Retrieve the messages published to the platform endpoint using [curl](https://cu curl "http://localhost:4566/_aws/sns/platform-endpoint-messages" | jq . ``` -The following output is displayed: -```json + +```bash title="Output" { "platform_endpoint_messages": { "arn:aws:sns:us-east-1:000000000000:endpoint/APNS/app-test/c25f353e-856b-4b02-a725-6bde35e6e944": [ @@ -307,9 +297,9 @@ We can now check that the messages have been properly deleted: curl "http://localhost:4566/_aws/sns/platform-endpoint-messages" | jq . ``` -The following output is displayed: -```json + +```bash title="Output" { "platform_endpoint_messages": {}, "region": "us-east-1" @@ -350,9 +340,7 @@ awslocal sns publish \ --message "Hello World!" ``` -An example response is shown below: - -```json +```bash title="Output" { "MessageId": "9ce56934-dcc4-45f5-ba40-13691329fc67" } @@ -364,9 +352,7 @@ Retrieve the message published using [curl](https://curl.se/) and [jq](https://j curl "http://localhost:4566/_aws/sns/sms-messages" | jq . ``` -The following output is displayed: - -```json +```bash title="Output" { "sms_messages": { "+123123123": [ @@ -400,9 +386,7 @@ We can now check that the messages have been properly deleted: curl "http://localhost:4566/_aws/sns/sms-messages" | jq . ``` -The following output is displayed: - -```json +```bash title="Output" { "sms_messages": {}, "region": "us-east-1" @@ -445,9 +429,7 @@ Create an SNS topic, and create a subscription to a external HTTP SNS integratio awslocal sns create-topic --name "test-external-integration" ``` -The following output is displayed: - -```json +```bash title="Output" { "TopicArn": "arn:aws:sns:us-east-1:000000000000:test-external-integration" } @@ -463,9 +445,7 @@ awslocal sns subscribe \ --return-subscription-arn ``` -The following output is displayed: - -```json +```bash title="Output" { "SubscriptionArn": "arn:aws:sns:us-east-1:000000000000:test-external-integration:c3ab47f3-b964-461d-84eb-903d8765b0c8" } @@ -479,9 +459,7 @@ awslocal sns get-subscription-attributes \ --subscription-arn "arn:aws:sns:us-east-1:000000000000:test-external-integration:c3ab47f3-b964-461d-84eb-903d8765b0c8" ``` -The following output is displayed: - -```json +```bash title="Output" { "Attributes": { "TopicArn": "arn:aws:sns:us-east-1:000000000000:test-external-integration", @@ -502,7 +480,7 @@ To manually confirm the subscription, we will fetch its token with our developer curl "http://localhost:4566/_aws/sns/subscription-tokens/arn:aws:sns:us-east-1:000000000000:test-external-integration:c3ab47f3-b964-461d-84eb-903d8765b0c8" | jq . ``` -The following output is displayed: + ```json { @@ -519,9 +497,7 @@ awslocal sns confirm-subscription \ --token 75732d656173742d312f3b875fb03b875fb03b875fb03b875fb03b875fb03b87 ``` -The following output is displayed: - -```json +```bash title="Output" { "SubscriptionArn": "arn:aws:sns:us-east-1:000000000000:test-external-integration:c3ab47f3-b964-461d-84eb-903d8765b0c8" } @@ -534,9 +510,7 @@ awslocal sns get-subscription-attributes \ --subscription-arn "arn:aws:sns:us-east-1:000000000000:test-external-integration:c3ab47f3-b964-461d-84eb-903d8765b0c8" ``` -The following output is displayed: - -```json +```bash title="Output" { "Attributes": { "TopicArn": "arn:aws:sns:us-east-1:000000000000:test-external-integration", diff --git a/src/content/docs/aws/services/sqs.mdx b/src/content/docs/aws/services/sqs.mdx index 020e54d5..8af29e2e 100644 --- a/src/content/docs/aws/services/sqs.mdx +++ b/src/content/docs/aws/services/sqs.mdx @@ -39,9 +39,7 @@ Run the following command to list all queues in your account: awslocal sqs list-queues ``` -You will see the following output: - -```json +```bash title="Output" { "QueueUrls": [ "http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/localstack-queue" @@ -74,9 +72,8 @@ awslocal sqs send-message \ ``` It will return the MD5 hash of the Message Body and a Message ID. -You will see output similar to the following: -```json +```bash title="Output" { "MD5OfMessageBody": "b10a8db164e0754105b7a99be72e3fe5", "MessageId": "92612c02-4879-47db-92f6-40bf2b341c07" @@ -123,15 +120,14 @@ Here's an end-to-end example of how to use message move tasks to test DLQ redriv First, create three queues. One will serve as original input queue, one as DLQ, and the third as target for DLQ redrive. + ```bash awslocal sqs create-queue --queue-name input-queue awslocal sqs create-queue --queue-name dead-letter-queue awslocal sqs create-queue --queue-name recovery-queue ``` -The following output is displayed: - -```json +```bash title="Output" { "QueueUrl": "http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/input-queue" } @@ -193,9 +189,7 @@ awslocal sqs list-message-move-tasks \ --source-arn arn:aws:sqs:us-east-1:000000000000:dead-letter-queue ``` -The following output is displayed: - -```json +```bash title="Output" { "Results": [ { @@ -213,7 +207,11 @@ The following output is displayed: Receiving messages from the recovery queue should now show us the original message: ```bash -$ awslocal sqs receive-message --queue-url http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/recovery-queue +awslocal sqs receive-message \ + --queue-url http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/recovery-queue +``` + +```bash title="Output" { "Messages": [ { @@ -239,9 +237,7 @@ For instance, you can use a basic [curl](https://curl.se/) command to send a `Se curl "http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/localstack-queue?Action=SendMessage&MessageBody=hello%2Fworld" ``` -You will see the following output: - -```xml +```xml title="Output" @@ -266,7 +262,7 @@ curl -H "Accept: application/json" "http://sqs.us-east-1.localhost.localstack.cl The response will be in JSON format: -```json +```bash title="Output" { "SendMessageResponse": { "SendMessageResult": { @@ -426,7 +422,7 @@ print(response.text) # outputs the response XML An example response is shown below: -```xml +```xml title="Output" @@ -507,7 +503,7 @@ print(response.text) # outputs the response XML An example response is shown below: -```json +```bash title="Output" { "ReceiveMessageResponse": { "ReceiveMessageResult": { @@ -592,7 +588,7 @@ print(response) An example response is shown below: -```json +```bash title="Output" { "Messages": [ { @@ -650,7 +646,7 @@ print(response.text) This will also include messages that currently have an active visibility timeout or were delayed and are not actually in the queue yet. Here's an example: -```json +```bash title="Output" [ { "MessageId": "1c4187cc-f2c9-4f1c-9702-4a3bfaaa4817", diff --git a/src/content/docs/aws/services/ssm.mdx b/src/content/docs/aws/services/ssm.mdx index a901b5ab..0f5c19aa 100644 --- a/src/content/docs/aws/services/ssm.mdx +++ b/src/content/docs/aws/services/ssm.mdx @@ -43,9 +43,7 @@ awslocal ec2 run-instances \ --image-id ami-00a001 --count 1 ``` -The following output would be retrieved: - -```bash +```bash title="Output" { ... "Instances": [ @@ -79,9 +77,7 @@ awslocal ssm send-command --document-name "AWS-RunShellScript" \ --parameters "commands='cat lsb-release',workingDirectory=/etc" ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Command": { "CommandId": "23547a9b-6993-4967-9446-f96b9b5dac70", @@ -109,9 +105,8 @@ awslocal ssm get-command-invocation \ ``` Change the `CommandId` and `InstanceId` values to the ones you received in the previous step. -The following output would be retrieved: -```bash +```bash title="Output" { "CommandId": "23547a9b-6993-4967-9446-f96b9b5dac70", "InstanceId": "i-abf6920789a06dd84", diff --git a/src/content/docs/aws/services/stepfunctions.mdx b/src/content/docs/aws/services/stepfunctions.mdx index b84dd734..dbf2b155 100644 --- a/src/content/docs/aws/services/stepfunctions.mdx +++ b/src/content/docs/aws/services/stepfunctions.mdx @@ -53,9 +53,7 @@ awslocal stepfunctions create-state-machine \ --role-arn "arn:aws:iam::000000000000:role/stepfunctions-role" ``` -The output of the above command is the ARN of the state machine: - -```json +```bash title="Output" { "stateMachineArn": "arn:aws:states:us-east-1:000000000000:stateMachine:CreateAndListBuckets", "creationDate": 1714643996.18017 @@ -73,9 +71,7 @@ awslocal stepfunctions start-execution \ --state-machine-arn "arn:aws:states:us-east-1:000000000000:stateMachine:CreateAndListBuckets" ``` -The output of the above command is the execution ARN: - -```json +```bash title="Output" { "executionArn": "arn:aws:states:us-east-1:000000000000:execution:CreateAndListBuckets:bf7d2138-e96f-42d1-b1f9-41f0c1c7bc3e", "startDate": 1714644089.748442 @@ -94,9 +90,7 @@ awslocal stepfunctions describe-execution \ Replace the `execution-arn` with the ARN of the execution you want to describe. -The output of the above command is the execution status: - -```json +```bash title="Output" { "executionArn": "arn:aws:states:us-east-1:000000000000:execution:CreateAndListBuckets:bf7d2138-e96f-42d1-b1f9-41f0c1c7bc3e", "stateMachineArn": "arn:aws:states:us-east-1:000000000000:stateMachine:CreateAndListBuckets", @@ -173,7 +167,7 @@ The first step is to select the state machine where mocked responses should be a In this example, we'll use a state machine named `LambdaSQSIntegration`, defined as follows: -```json +```json title="LambdaSQSIntegration.json" { "Comment": "This state machine is called: LambdaSQSIntegration", "QueryLanguage": "JSONata", @@ -458,8 +452,6 @@ awslocal stepfunctions describe-execution \ --execution-arn "arn:aws:states:us-east-1:000000000000:execution:LambdaSQSIntegration:MockExecutionBaseCase" ``` -The sample output shows the execution details, including the state machine ARN, execution ARN, status, start and stop dates, input, and output: - ```json { "executionArn": "arn:aws:states:us-east-1:000000000000:execution:LambdaSQSIntegration:MockExecutionBaseCase", @@ -488,7 +480,7 @@ awslocal stepfunctions get-execution-history \ This will return the full execution history, including entries that indicate how mocked responses were applied to Lambda and SQS states. -```json +```bash title="Output" ... { "timestamp": "...", diff --git a/src/content/docs/aws/services/sts.mdx b/src/content/docs/aws/services/sts.mdx index 77770a07..0b3cc890 100644 --- a/src/content/docs/aws/services/sts.mdx +++ b/src/content/docs/aws/services/sts.mdx @@ -42,9 +42,7 @@ awslocal iam create-access-key \ --user-name localstack-user ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "AccessKey": { "UserName": "localstack-user", @@ -63,9 +61,7 @@ Run the following command using your long-term credentials to get your temporary awslocal sts get-session-token ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Credentials": { "AccessKeyId": "ACCESS_KEY_ID", @@ -87,9 +83,7 @@ awslocal iam create-role \ --assume-role-policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::000000000000:root"},"Action":"sts:AssumeRole"}]}' ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Role": { "Path": "/", @@ -133,9 +127,7 @@ awslocal sts assume-role \ --role-session-name localstack-session ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Credentials": { "AccessKeyId": "ACCESS_KEY_ID", @@ -162,9 +154,7 @@ Run the following command to get the caller identity for the credentials set in awslocal sts get-caller-identity ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "UserId": "AKIAIOSFODNN7EXAMPLE", "Account": "000000000000", diff --git a/src/content/docs/aws/services/support.mdx b/src/content/docs/aws/services/support.mdx index 5c398457..2e1a04bf 100644 --- a/src/content/docs/aws/services/support.mdx +++ b/src/content/docs/aws/services/support.mdx @@ -42,9 +42,7 @@ awslocal support create-case \ --communication-body "This is a test case" ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "caseId": "case-12345678910-2020-kEa16f90bJE766J4" } @@ -59,9 +57,7 @@ The following example lists all cases in the category "General guidance". awslocal support describe-cases ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "cases": [ { @@ -96,9 +92,8 @@ awslocal support resolve-case \ ``` Replace the case ID with the ID of the case you want to resolve. -The following output would be retrieved: -```bash +```bash title="Output" { "initialCaseStatus": "resolved", "finalCaseStatus": "resolved" diff --git a/src/content/docs/aws/services/swf.mdx b/src/content/docs/aws/services/swf.mdx index c9cea2e1..6eaaca0d 100644 --- a/src/content/docs/aws/services/swf.mdx +++ b/src/content/docs/aws/services/swf.mdx @@ -41,9 +41,7 @@ awslocal swf describe-domain \ --name test-domain ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "domainInfo": { "name": "test-domain", @@ -106,7 +104,7 @@ awslocal swf describe-workflow-type \ The following output would be retrieved: -```bash +```bash title="Output" { "typeInfo": { "workflowType": { @@ -155,7 +153,7 @@ awslocal swf describe-activity-type \ The following output would be retrieved: -```bash +```bash title="Output" { "typeInfo": { "activityType": { @@ -193,7 +191,7 @@ awslocal swf start-workflow-execution \ The following output would be retrieved: -```bash +```bash title="Output" { "runId": "0602601afc71403abb934d8094c51668" } diff --git a/src/content/docs/aws/services/textract.mdx b/src/content/docs/aws/services/textract.mdx index f1f6920e..1181f9c2 100644 --- a/src/content/docs/aws/services/textract.mdx +++ b/src/content/docs/aws/services/textract.mdx @@ -30,9 +30,7 @@ awslocal textract detect-document-text \ --document '{"S3Object":{"Bucket":"your-bucket","Name":"your-document"}}' ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "DocumentMetadata": { "Pages": { @@ -54,9 +52,7 @@ awslocal textract start-document-text-detection \ --document-location '{"S3Object":{"Bucket":"bucket","Name":"document"}}' ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "JobId": "501d7251-1249-41e0-a0b3-898064bfc506" } @@ -75,9 +71,8 @@ awslocal textract get-document-text-detection \ ``` Replace `501d7251-1249-41e0-a0b3-898064bfc506` with the `JobId` value retrieved from the previous command. -The following output would be retrieved: -```bash +```bash title="Output" { "DocumentMetadata": { "Pages": { diff --git a/src/content/docs/aws/services/timestream.mdx b/src/content/docs/aws/services/timestream.mdx index 9371a573..f0c2a40a 100644 --- a/src/content/docs/aws/services/timestream.mdx +++ b/src/content/docs/aws/services/timestream.mdx @@ -43,9 +43,7 @@ Finally, we can run a query to retrieve the timeseries data (or aggregate values awslocal timestream-query query --query-string "SELECT CREATE_TIME_SERIES(time, measure_value::double) as cpu FROM testDB.timeStreamTable WHERE measure_name='cpu'" ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "Rows": [{ "Data": [{ diff --git a/src/content/docs/aws/services/transcribe.mdx b/src/content/docs/aws/services/transcribe.mdx index a8b4882a..1013e757 100644 --- a/src/content/docs/aws/services/transcribe.mdx +++ b/src/content/docs/aws/services/transcribe.mdx @@ -58,7 +58,7 @@ awslocal transcribe list-transcription-jobs The following output would be retrieved: -```bash +```bash title="Output" { "TranscriptionJobSummaries": [ { @@ -81,9 +81,7 @@ Run the following command to get the transcript: awslocal transcribe get-transcription-job --transcription-job example ``` -The following output would be retrieved: - -```bash +```bash title="Output" { "TranscriptionJob": { "TranscriptionJobName": "example", @@ -112,7 +110,7 @@ jq .results.transcripts[0].transcript 7844aaa5.json The following output would be retrieved: -```bash +```bash title="Output" "it is just a question of getting rid of the illusion that we are separate from nature" ``` diff --git a/src/content/docs/aws/services/transfer.mdx b/src/content/docs/aws/services/transfer.mdx index 61cd9979..6574c0eb 100644 --- a/src/content/docs/aws/services/transfer.mdx +++ b/src/content/docs/aws/services/transfer.mdx @@ -78,7 +78,7 @@ The Transfer API does not provide a way to return the endpoint URL of created FT Hence, in order to determine the server endpoint, the local port is encoded as a suffix within the `ServerId` attribute, constituting the only numeric digits within the ID string. For example, assume the following is the response from the `CreateServer` API call, then the FTP server is accessible on port `4511` (i.e., `ftp://localhost:4511`): -```json +```bash title="Output" { "ServerId": "s-afcedbffaecca4511" } diff --git a/src/content/docs/aws/services/verifiedpermissions.mdx b/src/content/docs/aws/services/verifiedpermissions.mdx index afba29ec..f786dc6f 100644 --- a/src/content/docs/aws/services/verifiedpermissions.mdx +++ b/src/content/docs/aws/services/verifiedpermissions.mdx @@ -33,9 +33,7 @@ awslocal verifiedpermissions create-policy-store \ --description "A local Policy Store" ``` -The above command returns the following response: - -```json +```bash title="Output" { "policyStoreId": "q5PCScu9qo4aswMVc0owNN", "arn": "arn:aws:verifiedpermissions::000000000000:policy-store/q5PCScu9qo4aswMVc0owNN", @@ -78,7 +76,7 @@ Replace the policy store ID with the ID of the policy store you created previous You should see the following output: -```json +```bash title="Output" { "policyStoreId": "q5PCScu9qo4aswMVc0owNN", "policyId": "MfsIseJDeZsr5WUm3tB4FX", @@ -108,7 +106,7 @@ You should see the following output: We can now make use of the Policy Store and the Policy to start authorizing requests. To authorize a request using Verified Permissions, use the [`IsAuthorized`](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_IsAuthorized.html) API. -```bash +```bash title="Output" awslocal verifiedpermissions is-authorized \ --policy-store-id q5PCScu9qo4aswMVc0owNN \ --principal entityType=User,entityId=alice \ @@ -118,7 +116,7 @@ awslocal verifiedpermissions is-authorized \ You should get the following output, indicating that your request was allowed: -```json +```bash title="Output" { "decision": "ALLOW", "determiningPolicies": [ diff --git a/src/content/docs/aws/services/waf.mdx b/src/content/docs/aws/services/waf.mdx index 94d0f490..af081bf6 100644 --- a/src/content/docs/aws/services/waf.mdx +++ b/src/content/docs/aws/services/waf.mdx @@ -34,9 +34,7 @@ awslocal wafv2 create-web-acl \ --visibility-config SampledRequestsEnabled=true,CloudWatchMetricsEnabled=true,MetricName=TestWebAclMetrics ``` -The following output would be retrieved: - -```json +```bash title="Output" { "Summary": { "Name": "TestWebAcl", @@ -58,9 +56,7 @@ Run the following command to list the WebACLs: awslocal wafv2 list-web-acls --scope REGIONAL ``` -The following output would be retrieved: - -```json +```bash title="Output" { "NextMarker": "Not Implemented", "WebACLs": [ @@ -95,9 +91,7 @@ awslocal wafv2 list-tags-for-resource \ --resource-arn arn:aws:wafv2:us-east-1:000000000000:regional/webacl/TestWebAcl/f94fd5bc-e4d4-4280-9f53-51e9441ad51d ``` -The following output would be retrieved: - -```json +```bash title="Output" { "TagInfoForResource": { "ResourceARN": "arn:aws:wafv2:us-east-1:000000000000:regional/webacl/TestWebAcl/f94fd5bc-e4d4-4280-9f53-51e9441ad51d", diff --git a/src/content/docs/aws/services/xray.mdx b/src/content/docs/aws/services/xray.mdx index f87ab85b..b9543570 100644 --- a/src/content/docs/aws/services/xray.mdx +++ b/src/content/docs/aws/services/xray.mdx @@ -56,9 +56,7 @@ echo "Sending trace segment to X-Ray API: $DOC" awslocal xray put-trace-segments --trace-segment-documents "$DOC" ``` -The following output would be retrieved: - -```json +```bash title="Output" Sending trace segment to X-Ray API: {"trace_id": "1-6501ee11-056ec85fafff21f648e2d3ae", "id": "6226467e3f845502", "start_time": 1694625297.37518, "end_time": 1694625300.4042, "name": "test.elasticbeanstalk.com"} { "UnprocessedTraceSegments": [] @@ -102,9 +100,7 @@ Run the following commands in your terminal (use the same terminal as for the fi awslocal xray batch-get-traces --trace-ids $TRACE_ID ``` -The following output would be retrieved: - -```json +```bash title="Output" { "Traces": [ { diff --git a/src/content/docs/aws/tooling/localstack-sdks/python-sdk.md b/src/content/docs/aws/tooling/localstack-sdks/python-sdk.md index 407c24a8..87508d81 100644 --- a/src/content/docs/aws/tooling/localstack-sdks/python-sdk.md +++ b/src/content/docs/aws/tooling/localstack-sdks/python-sdk.md @@ -86,7 +86,7 @@ for msg in messages: print("Message Body:", msg.get("Body")) ``` -The following output is displayed: + ```bash Message Body: {"event": "event-0", "message": "message-0"} @@ -132,7 +132,7 @@ for msg in messages: client.discard_ses_messages() ``` -The following output is displayed: + ```bash Message ID: khqzljuixhpnpejl-mnlhgajk-ebch-zfxq-orit-qgexxjlrkipo-ywgvwr @@ -171,7 +171,7 @@ client.delete_pod(pod_name=POD_NAME) print(f"Pod '{POD_NAME}' deleted.") ``` -The following output is displayed: + ```bash Pods: cloudpods=[PodListCloudpodsInner(max_version=1, pod_name='check-pod', last_change=None)] @@ -215,7 +215,7 @@ except Exception as exc: print("Error after state reset:", error_code) ``` -The following output is displayed: + ```bash Queue URL before reset: http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/test-queue @@ -249,7 +249,7 @@ rules = client.delete_fault_rules(fault_rules=[rule]) print("Rules after deleting S3 rule:", [(r.region, r.service) for r in rules]) ``` -The following output is displayed: + ```bash Added S3 rule: [('us-east-1', 's3')] diff --git a/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md b/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md index 07457214..38a645e1 100644 --- a/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md +++ b/src/content/docs/snowflake/tutorials/credit-scoring-with-localstack-snowpark.md @@ -59,7 +59,7 @@ session.sql("use schema credit_bank.public").collect() print(session.sql("select current_warehouse(), current_database(), current_schema(), current_user(), current_role()").collect()) ``` -The following output is displayed: + ```bash [Row(?COLUMN?='TEST', CURRENT_DATABASE='CREDIT_BANK', CURRENT_SCHEMA='public', ?COLUMN?='TEST', GET_CURRENT_ROLE='PUBLIC')] @@ -82,7 +82,7 @@ credit_df = session.table("CREDIT_FILES") credit_df.schema ``` -The following output is displayed: + ```bash StructType([StructField('CREDIT_REQUEST_ID', LongType(), nullable=True), StructField('CREDIT_AMOUNT', LongType(), nullable=True), StructField('CREDIT_DURATION', LongType(), nullable=True), StructField('PURPOSE', StringType(), nullable=True), StructField('INSTALLMENT_COMMITMENT', LongType(), nullable=True), StructField('OTHER_PARTIES', StringType(), nullable=True), StructField('CREDIT_STANDING', StringType(), nullable=True), StructField('CREDIT_SCORE', LongType(), nullable=True), StructField('CHECKING_BALANCE', LongType(), nullable=True), StructField('SAVINGS_BALANCE', LongType(), nullable=True), StructField('EXISTING_CREDITS', LongType(), nullable=True), StructField('ASSETS', StringType(), nullable=True), StructField('HOUSING', StringType(), nullable=True), StructField('QUALIFICATION', StringType(), nullable=True), StructField('JOB_HISTORY', LongType(), nullable=True), StructField('AGE', LongType(), nullable=True), StructField('SEX', StringType(), nullable=True), StructField('MARITAL_STATUS', StringType(), nullable=True), StructField('NUM_DEPENDENTS', LongType(), nullable=True), StructField('RESIDENCE_SINCE', LongType(), nullable=True), StructField('OTHER_PAYMENT_PLANS', StringType(), nullable=True)]) @@ -97,7 +97,7 @@ credit_req_df = session.table("CREDIT_REQUESTS") credit_req_df.schema ``` -The following output is displayed: + ```bash StructType([StructField('CREDIT_REQUEST_ID', LongType(), nullable=True), StructField('CREDIT_AMOUNT', LongType(), nullable=True), StructField('CREDIT_DURATION', LongType(), nullable=True), StructField('PURPOSE', StringType(), nullable=True), StructField('INSTALLMENT_COMMITMENT', LongType(), nullable=True), StructField('OTHER_PARTIES', StringType(), nullable=True), StructField('CREDIT_SCORE', LongType(), nullable=True), StructField('CHECKING_BALANCE', LongType(), nullable=True), StructField('SAVINGS_BALANCE', LongType(), nullable=True), StructField('EXISTING_CREDITS', LongType(), nullable=True), StructField('ASSETS', StringType(), nullable=True), StructField('HOUSING', StringType(), nullable=True), StructField('QUALIFICATION', StringType(), nullable=True), StructField('JOB_HISTORY', LongType(), nullable=True), StructField('AGE', LongType(), nullable=True), StructField('SEX', StringType(), nullable=True), StructField('MARITAL_STATUS', StringType(), nullable=True), StructField('NUM_DEPENDENTS', LongType(), nullable=True), StructField('RESIDENCE_SINCE', LongType(), nullable=True), StructField('OTHER_PAYMENT_PLANS', StringType(), nullable=True)]) @@ -123,7 +123,7 @@ You can also visualize the numeric features and categorical features. For exampl credit_df.toPandas().hist(figsize=(15,15)) ``` -The following output is displayed: +

![credit_df_hist](/images/snowflake/credit_df_hist.png) @@ -152,7 +152,7 @@ sns.stripplot(y="PURPOSE", x="CREDIT_AMOUNT", data=df, hue='CREDIT_STANDING', ji plt.show() ``` -The following output is displayed: +

![credit_df_cat](/images/snowflake/credit_df_cat.png)