Skip to content

Commit 678cd5f

Browse files
committed
Update docs requirements using pip-compile. Add privacy plugin. Add llms.txt plugin. Make Idempotency documentation environment variable naming consistent. Fix documentation formatting issue in FAQ.md.
1 parent 7f604e4 commit 678cd5f

File tree

7 files changed

+365
-45
lines changed

7 files changed

+365
-45
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ native-libs/
2828
classes/
2929
out/
3030

31-
3231
######################
3332
# Eclipse
3433
######################
@@ -99,6 +98,7 @@ Desktop.ini
9998

10099
docs/node_modules
101100
docs/.cache
101+
.cache
102102
docs/public
103103
/example/.aws-sam/
104104
/example/HelloWorldFunction/.aws-sam/
@@ -110,4 +110,4 @@ example/HelloWorldFunction/build
110110
.gradle
111111
build/
112112
.terraform*
113-
terraform.tfstate*
113+
terraform.tfstate*

docs/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
FROM squidfunk/mkdocs-material
2-
RUN pip install mkdocs-git-revision-date-plugin mkdocs-macros-plugin
1+
FROM squidfunk/mkdocs-material@sha256:23b69789b1dd836c53ea25b32f62ef8e1a23366037acd07c90959a219fd1f285
2+
3+
COPY requirements.txt /tmp/
4+
RUN pip install --require-hashes -r /tmp/requirements.txt

docs/FAQs.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ Instead, set a specific classifier of the `aws-crt` to use the one for your targ
7979
By specifying the specific target runtime, we prevent other target runtimes from being included in the jar file, resulting in a smaller Lambda package and improved cold start times.
8080

8181
```xml
82-
8382
<dependencies>
8483
<dependency>
8584
<groupId>software.amazon.awssdk</groupId>
@@ -108,39 +107,40 @@ Depending on the Powertools module, there is a different way to configure the SD
108107

109108
The following example shows how to use the Lambda Powertools Parameters module while leveraging the AWS CRT Client.
110109

111-
```java hl_lines="11-16 19-20 22"
112-
import static software.amazon.lambda.powertools.parameters.transform.Transformer.base64;
113-
114-
import com.amazonaws.services.lambda.runtime.Context;
115-
import com.amazonaws.services.lambda.runtime.RequestHandler;
116-
import software.amazon.awssdk.services.ssm.SsmClient;
117-
import software.amazon.awssdk.http.crt.AwsCrtHttpClient;
118-
import software.amazon.lambda.powertools.parameters.ssm.SSMProvider;
119-
120-
public class RequestHandlerWithParams implements RequestHandler<String, String> {
121-
122-
// Get an instance of the SSMProvider with a custom HTTP client (aws crt).
123-
SSMProvider ssmProvider = SSMProvider
124-
.builder()
125-
.withClient(
126-
SsmClient.builder()
127-
.httpClient(AwsCrtHttpClient.builder().build())
128-
.build()
129-
)
130-
.build();
131-
132-
public String handleRequest(String input, Context context) {
133-
// Retrieve a single param
134-
String value = ssmProvider
135-
.get("/my/secret");
136-
// We might instead want to retrieve multiple parameters at once, returning a Map of key/value pairs
137-
// .getMultiple("/my/secret/path");
138-
139-
// Return the result
140-
return value;
141-
}
110+
```java hl_lines="16 23-24"
111+
import static software.amazon.lambda.powertools.parameters.transform.Transformer.base64;
112+
113+
import com.amazonaws.services.lambda.runtime.Context;
114+
import com.amazonaws.services.lambda.runtime.RequestHandler;
115+
import software.amazon.awssdk.services.ssm.SsmClient;
116+
import software.amazon.awssdk.http.crt.AwsCrtHttpClient;
117+
import software.amazon.lambda.powertools.parameters.ssm.SSMProvider;
118+
119+
public class RequestHandlerWithParams implements RequestHandler<String, String> {
120+
121+
// Get an instance of the SSMProvider with a custom HTTP client (aws crt).
122+
SSMProvider ssmProvider = SSMProvider
123+
.builder()
124+
.withClient(
125+
SsmClient.builder()
126+
.httpClient(AwsCrtHttpClient.builder().build())
127+
.build()
128+
)
129+
.build();
130+
131+
public String handleRequest(String input, Context context) {
132+
// Retrieve a single param
133+
String value = ssmProvider
134+
.get("/my/secret");
135+
// We might instead want to retrieve multiple parameters at once, returning a Map of key/value pairs
136+
// .getMultiple("/my/secret/path");
137+
138+
// Return the result
139+
return value;
142140
}
143-
```
141+
}
142+
```
143+
144144
The `aws-crt-client` was considered for adoption as the default HTTP client in Lambda Powertools for Java as mentioned in [Move SDK http client to CRT](https://github.com/aws-powertools/powertools-lambda-java/issues/1092),
145145
but due to the impact on the developer experience it was decided to stick with the `url-connection-client`.
146146

docs/requirements.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
mkdocs-git-revision-date-plugin==0.3.2
2+
mkdocs-macros-plugin==1.3.7
3+
mkdocs-llmstxt==0.2.0

0 commit comments

Comments
 (0)