Skip to content

Commit 4bab281

Browse files
committed
do more
1 parent d289765 commit 4bab281

File tree

4 files changed

+119
-118
lines changed

4 files changed

+119
-118
lines changed

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

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "EventBridge Scheduler"
3-
linkTitle: "EventBridge Scheduler"
43
description: Get started with EventBridge Scheduler on LocalStack
54
tags: ["Free"]
65
---
@@ -12,7 +11,7 @@ You can use EventBridge Scheduler to create schedules that run at a specific tim
1211
You can also use EventBridge Scheduler to create schedules that run within a flexible time window.
1312

1413
LocalStack allows you to use the Scheduler APIs in your local environment to create and run schedules.
15-
The supported APIs are available on our [API coverage page]({{< ref "coverage_scheduler" >}}), which provides information on the extent of EventBridge Scheduler's integration with LocalStack.
14+
The supported APIs are available on our [API coverage page](), which provides information on the extent of EventBridge Scheduler's integration with LocalStack.
1615

1716
## Getting started
1817

@@ -26,18 +25,18 @@ We will demonstrate how you can create a new schedule, list all schedules, and t
2625
You can create a new SQS queue using the [`CreateQueue`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_CreateQueue.html) API.
2726
Run the following command to create a new SQS queue:
2827

29-
{{< command >}}
30-
$ awslocal sqs create-queue --queue-name local-notifications
31-
{{< /command >}}
28+
```bash
29+
awslocal sqs create-queue --queue-name local-notifications
30+
```
3231

3332
You can fetch the Queue ARN using the [`GetQueueAttributes`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_GetQueueAttributes.html) API.
3433
Run the following command to fetch the Queue ARN by specifying the Queue URL:
3534

36-
{{< command >}}
37-
$ awslocal sqs get-queue-attributes \
35+
```bash
36+
awslocal sqs get-queue-attributes \
3837
--queue-url http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/local-notifications \
3938
--attribute-names All
40-
{{< /command >}}
39+
```
4140

4241
Save the Queue ARN for later use.
4342

@@ -46,13 +45,13 @@ Save the Queue ARN for later use.
4645
You can create a new schedule using the [`CreateSchedule`](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_CreateSchedule.html) API.
4746
Run the following command to create a new schedule:
4847

49-
{{< command >}}
50-
$ awslocal scheduler create-schedule \
48+
```bash
49+
awslocal scheduler create-schedule \
5150
--name sqs-templated-schedule \
5251
--schedule-expression 'rate(5 minutes)' \
5352
--target '{"RoleArn": "arn:aws:iam::000000000000:role/schedule-role", "Arn":"arn:aws:sqs:us-east-1:000000000000:local-notifications", "Input": "test" }' \
5453
--flexible-time-window '{ "Mode": "OFF"}'
55-
{{< /command >}}
54+
```
5655

5756
The following output is displayed:
5857

@@ -67,9 +66,9 @@ The following output is displayed:
6766
You can list all schedules using the [`ListSchedules`](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListSchedules.html) API.
6867
Run the following command to list all schedules:
6968

70-
{{< command >}}
71-
$ awslocal scheduler list-schedules
72-
{{< /command >}}
69+
```bash
70+
awslocal scheduler list-schedules
71+
```
7372

7473
The following output is displayed:
7574

@@ -96,19 +95,18 @@ The following output is displayed:
9695
You can tag a schedule using the [`TagResource`](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_TagResource.html) API.
9796
Run the following command to tag a schedule:
9897

99-
{{< command >}}
100-
$ awslocal scheduler tag-resource \
98+
```bash
99+
awslocal scheduler tag-resource \
101100
--resource-arn arn:aws:scheduler:us-east-1:000000000000:schedule/default/sqs-templated-schedule \
102101
--tags Key=Name,Value=Test
103-
{{< /command >}}
102+
```
104103

105104
You can view the tags associated with a schedule using the [`ListTagsForResource`](https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListTagsForResource.html) API.
106105
Run the following command to list the tags associated with a schedule:
107106

108-
{{< command >}}
109-
$ awslocal scheduler list-tags-for-resource \
110-
--resource-arn arn:aws:scheduler:us-east-1:000000000000:schedule/default/sqs-templated-schedule
111-
{{< /command >}}
107+
```bash
108+
awslocal scheduler list-tags-for-resource \
109+
--resource-arn arn:aws:scheduler:us-east-1:00000000
112110

113111
The following output is displayed:
114112

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

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "Secrets Manager"
3-
linkTitle: "Secrets Manager"
43
description: Get started with Secrets Manager on LocalStack
54
persistence: supported
65
tags: ["Free"]
@@ -13,7 +12,7 @@ Secrets Manager integrates seamlessly with AWS services, making it easier to man
1312
Secrets Manager supports automatic secret rotation, replacing long-term secrets with short-term ones to mitigate the risk of compromise without requiring application updates.
1413

1514
LocalStack allows you to use the Secrets Manager APIs in your local environment to manage, retrieve, and rotate secrets.
16-
The supported APIs are available on our [API coverage page]({{< ref "coverage_secretsmanager" >}}), which provides information on the extent of Secrets Manager's integration with LocalStack.
15+
The supported APIs are available on our [API coverage page](), which provides information on the extent of Secrets Manager's integration with LocalStack.
1716

1817
## Getting started
1918

@@ -26,52 +25,52 @@ We will demonstrate how to create a secret, get the secret value, and rotate the
2625

2726
Before your create a secret, create a file named `secrets.json` and add the following content:
2827

29-
{{<command>}}
30-
$ touch secrets.json
31-
$ cat > secrets.json << EOF
28+
```bash
29+
touch secrets.json
30+
cat > secrets.json << EOF
3231
{
3332
"username": "admin",
3433
"password": "password"
3534
}
3635
EOF
37-
{{</command>}}
36+
```
3837

3938
You can now create a secret using the [`CreateSecret`](https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_CreateSecret.html) API.
4039
Execute the following command to create a secret named `test-secret`:
4140

42-
{{<command>}}
43-
$ awslocal secretsmanager create-secret \
41+
```bash
42+
awslocal secretsmanager create-secret \
4443
--name test-secret \
4544
--description "LocalStack Secret" \
4645
--secret-string file://secrets.json
47-
{{</command>}}
46+
```
4847

4948
Upon successful execution, the output will provide you with the ARN of the newly created secret.
5049
This identifier will be useful for further operations or integrations.
5150

5251
The following output would be retrieved:
5352

54-
{{<command>}}
53+
```bash
5554
{
5655
"ARN": "arn:aws:secretsmanager:us-east-1:000000000000:secret:test-secret-pyfjVP",
5756
"Name": "test-secret",
5857
"VersionId": "a50c6752-3343-4eb0-acf3-35c74f00f707"
5958
}
60-
{{</command>}}
59+
```
6160

6261
### Describe the secret
6362

6463
To retrieve the details of the secret you created earlier, you can use the [`DescribeSecret`](https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_DescribeSecret.html) API.
6564
Execute the following command:
6665

67-
{{<command>}}
68-
$ awslocal secretsmanager describe-secret \
66+
```bash
67+
awslocal secretsmanager describe-secret \
6968
--secret-id test-secret
70-
{{</command>}}
69+
```
7170

7271
The following output would be retrieved:
7372

74-
{{<command>}}
73+
```bash
7574
{
7675
"ARN": "arn:aws:secretsmanager:us-east-1:000000000000:secret:test-secret-pyfjVP",
7776
"Name": "test-secret",
@@ -84,29 +83,29 @@ The following output would be retrieved:
8483
},
8584
"CreatedDate": 1692882479.857329
8685
}
87-
{{</command>}}
86+
```
8887

8988
You can also get a list of the secrets available in your local environment that have **Secret** in the name using the [`ListSecrets`](https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_ListSecrets.html) API.
9089
Execute the following command:
9190

92-
{{<command>}}
93-
$ awslocal secretsmanager list-secrets \
91+
```bash
92+
awslocal secretsmanager list-secrets \
9493
--filters Key=name,Values=Secret
95-
{{</command>}}
94+
```
9695

9796
### Get the secret value
9897

9998
To retrieve the value of the secret you created earlier, you can use the [`GetSecretValue`](https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html) API.
10099
Execute the following command:
101100

102-
{{<command>}}
103-
$ awslocal secretsmanager get-secret-value \
101+
```bash
102+
awslocal secretsmanager get-secret-value \
104103
--secret-id test-secret
105-
{{</command>}}
104+
```
106105

107106
The following output would be retrieved:
108107

109-
{{<command>}}
108+
```bash
110109
{
111110
"ARN": "arn:aws:secretsmanager:us-east-1:000000000000:secret:test-secret-pyfjVP",
112111
"Name": "test-secret",
@@ -117,16 +116,16 @@ The following output would be retrieved:
117116
],
118117
"CreatedDate": 1692882479.857329
119118
}
120-
{{</command>}}
119+
```
121120

122121
You can tag your secret using the [`TagResource`](https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_TagResource.html) API.
123122
Execute the following command:
124123

125-
{{<command>}}
126-
$ awslocal secretsmanager tag-resource \
124+
```bash
125+
awslocal secretsmanager tag-resource \
127126
--secret-id test-secret \
128127
--tags Key=Environment,Value=Development
129-
{{</command>}}
128+
```
130129

131130
### Rotate the secret
132131

@@ -136,46 +135,46 @@ You can copy the code from a [Secrets Manager template](https://docs.aws.amazon.
136135
Zip the Lambda function and create a Lambda function using the [`CreateFunction`](https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html) API.
137136
Execute the following command:
138137

139-
{{<command>}}
140-
$ zip my-function.zip lambda_function.py
141-
$ awslocal lambda create-function \
138+
```bash
139+
zip my-function.zip lambda_function.py
140+
awslocal lambda create-function \
142141
--function-name my-rotation-function \
143142
--runtime python3.9 \
144143
--zip-file fileb://my-function.zip \
145144
--handler my-handler \
146145
--role arn:aws:iam::000000000000:role/service-role/rotation-lambda-role
147-
{{</command>}}
146+
```
148147

149148
You can now set a resource policy on the Lambda function to allow Secrets Manager to invoke it using [`AddPermission`](https://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html) API.
150149

151150
Please note that this is not required with the default LocalStack settings, since IAM permission enforcement is disabled by default.
152151

153152
Execute the following command:
154153

155-
{{<command>}}
156-
$ awslocal lambda add-permission \
154+
```bash
155+
awslocal lambda add-permission \
157156
--function-name my-rotation-function \
158157
--action lambda:InvokeFunction \
159158
--statement-id SecretsManager \
160159
--principal secretsmanager.amazonaws.com
161-
{{</command>}}
160+
```
162161

163162
You can now create a rotation schedule for the secret using the [`RotateSecret`](https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_RotateSecret.html) API.
164163
Execute the following command:
165164

166-
{{<command>}}
167-
$ awslocal secretsmanager rotate-secret \
165+
```bash
166+
awslocal secretsmanager rotate-secret \
168167
--secret-id MySecret \
169168
--rotation-lambda-arn arn:aws:lambda:us-east-1:000000000000:function:my-rotation-function \
170169
--rotation-rules "{\"ScheduleExpression\": \"cron(0 16 1,15 *?*)\", \"Duration\": \"2h\"}"
171-
{{</command>}}
170+
```
172171

173172
## Resource Browser
174173

175174
The LocalStack Web Application provides a Resource Browser for managing secrets in your local environment.
176175
You can access the Resource Browser by opening the LocalStack Web Application in your browser, navigating to the **Resources** section, and then clicking on **Secrets Manager** under the **Security Identity Compliance** section.
177176

178-
<img src="secrets-manager-resource-browser.png" alt="Secrets Manager Resource Browser" title="Secrets Manager Resource Browser" width="900" />
177+
![Secrets Manager Resource Browser](/images/aws/secrets-manager-resource-browser.png)
179178
<br>
180179
<br>
181180
The Resource Browser allows you to perform the following actions:

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

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: "Serverless Application Repository"
3-
linkTitle: "Serverless Application Repository"
4-
description: >
5-
Get started with Serverless Application Repository on LocalStack
3+
description: Get started with Serverless Application Repository on LocalStack
64
tags: ["Ultimate"]
75
---
86

@@ -13,7 +11,7 @@ Using Serverless Application Repository, developers can build & publish applicat
1311
Serverless Application Repository provides a user-friendly interface to search, filter, and browse through a diverse catalog of serverless applications.
1412

1513
LocalStack allows you to use the Serverless Application Repository APIs in your local environment to create, update, delete, and list serverless applications and components.
16-
The supported APIs are available on our [API coverage page]({{< ref "coverage_serverlessrepo" >}}), which provides information on the extent of Serverless Application Repository's integration with LocalStack.
14+
The supported APIs are available on our [API coverage page](), which provides information on the extent of Serverless Application Repository's integration with LocalStack.
1715

1816
## Getting started
1917

@@ -26,9 +24,9 @@ We will demonstrate how to create a SAM application that comprises a Hello World
2624

2725
To create a sample SAM application using the `samlocal` CLI, execute the following command:
2826

29-
{{< command >}}
30-
$ samlocal init --runtime python3.9
31-
{{< /command >}}
27+
```bash
28+
samlocal init --runtime python3.9
29+
```
3230

3331
This command downloads a sample SAM application template and generates a `template.yml` file in the current directory.
3432
The template includes a Lambda function and an API Gateway endpoint that supports a `GET` operation.
@@ -53,11 +51,11 @@ Metadata:
5351
5452
Once the Metadata section is added, run the following command to create the Lambda function deployment package and the packaged SAM template:
5553
56-
{{< command >}}
54+
```bash
5755
samlocal package \
5856
--template-file template.yaml \
5957
--output-template-file packaged.yaml
60-
{{< /command >}}
58+
```
6159

6260
This command generates a `packaged.yaml` file in the current directory containing the packaged SAM template.
6361
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:
@@ -74,30 +72,30 @@ Resources:
7472
7573
To retrieve the Application ID for your SAM application, you can utilize the [`awslocal`](https://github.com/localstack/awscli-local) CLI by running the following command:
7674

77-
{{< command >}}
75+
```bash
7876
awslocal serverlessrepo list-applications
79-
{{< /command >}}
77+
```
8078

8179
In the output, you will observe the `ApplicationId` property in the output, which is the Application ID for your SAM application, along with other properties such as the `Author`, `Description`, `Name`, `SpdxLicenseId`, and `Version` providing further details about your application.
8280

8381
### Publish the SAM application
8482

8583
To publish your application to the Serverless Application Repository, execute the following command:
8684

87-
{{< command >}}
85+
```bash
8886
samlocal publish \
8987
--template packaged.yaml \
9088
--region us-east-1
91-
{{< /command >}}
89+
```
9290

9391
### Delete the SAM application
9492

9593
To remove a SAM application from the Serverless Application Repository, you can use the following command:
9694

97-
{{< command >}}
95+
```bash
9896
awslocal serverlessrepo delete-application \
9997
--application-id <application-id>
100-
{{< /command >}}
98+
```
10199

102100
Replace `<application-id>` with the Application ID of your SAM application that you retrieved in the previous step.
103101

0 commit comments

Comments
 (0)