File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,32 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:
186
186
}
187
187
```
188
188
189
+ === "Pulumi"
190
+
191
+ ```typescript hl_lines="11"
192
+ import * as pulumi from "@pulumi/pulumi";
193
+ import * as aws from "@pulumi/aws";
194
+
195
+ const role = new aws.iam.Role("role", {
196
+ assumeRolePolicy: aws.iam.assumeRolePolicyForPrincipal(aws.iam.Principals.LambdaPrincipal),
197
+ managedPolicyArns: [aws.iam.ManagedPolicies.AWSLambdaBasicExecutionRole]
198
+ });
199
+
200
+ const lambdaFunction = new aws.lambda.Function("function", {
201
+ layers: [
202
+ pulumi.interpolate`arn:aws:lambda:${aws.getRegionOutput().name}:094274105915:layer:AWSLambdaPowertoolsTypeScript:3`
203
+ ],
204
+ code: new pulumi.asset.FileArchive("lambda_function_payload.zip"),
205
+ tracingConfig: {
206
+ mode: "Active"
207
+ },
208
+ runtime: aws.lambda.Runtime.NodeJS16dX,
209
+ handler: "index.handler",
210
+ role: role.arn,
211
+ architectures: ["x86_64"]
212
+ });
213
+ ```
214
+
189
215
=== "Amplify"
190
216
191
217
```zsh
You can’t perform that action at this time.
0 commit comments