Skip to content

Commit 8d5c00d

Browse files
committed
feat: increasing timeout of lambda functions
1 parent 5bf2a0c commit 8d5c00d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/iam-credentials-rotator.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export class IamCredentialsRotator extends Construct {
5252
environment: {
5353
SECRET_NAME_PREFIX: id.toLowerCase(),
5454
},
55+
timeout: Duration.seconds(30),
5556
},
5657
);
5758
credentialsRotatorLambda.addToRolePolicy(
@@ -108,6 +109,7 @@ export class IamCredentialsRotator extends Construct {
108109
// Step 3
109110
const cleanupLambda = new CleanupFunction(this, 'CleanupLambda', {
110111
description: 'Deletes old IAM credentials for a specific user',
112+
timeout: Duration.seconds(30),
111113
});
112114
cleanupLambda.addToRolePolicy(
113115
new iam.PolicyStatement({
@@ -166,6 +168,7 @@ export class IamCredentialsRotator extends Construct {
166168
STATE_MACHINE_ARN: stateMachine.stateMachineArn,
167169
USERNAMES_PARAMETER_NAME: usernamesParameter.parameterName,
168170
},
171+
timeout: Duration.seconds(30),
169172
},
170173
);
171174
stateMachine.grantStartExecution(eventHandlerFunction);

0 commit comments

Comments
 (0)