Skip to content

Commit 7f56d1b

Browse files
tongshen-stephanieStephanie Shen
andauthored
Add propagation time before testSecret within SecretsManagerRDSDb2RotationSingleUser (#142)
Co-authored-by: Stephanie Shen <tongshen@amazon.com>
1 parent 9482482 commit 7f56d1b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SecretsManagerRDSDb2RotationSingleUser/lambda_function.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: MIT-0
3+
import time
34

45
import boto3
56
import json
@@ -76,6 +77,9 @@ def lambda_handler(event, context):
7677

7778
elif step == "setSecret":
7879
set_secret(service_client, arn, token)
80+
# Wait for 10s to allow propagation of the newly set AWSPENDING password as the user password in the database.
81+
# The database user password change is asynchronous.
82+
time.sleep(10)
7983

8084
elif step == "testSecret":
8185
test_secret(service_client, arn, token)

0 commit comments

Comments
 (0)