Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/lambda_codebase/jump_role_manager/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

from aws_xray_sdk.core import patch_all
import boto3
from botocore.config import Config
from botocore.exceptions import ClientError

# ADF imports
Expand Down Expand Up @@ -79,8 +80,13 @@
/ CHARS_PER_ACCOUNT_ID,
)

BOTO_ORG_CONFIG = Config(
retries={
"max_attempts": 15,
},
)
IAM_CLIENT = boto3.client("iam")
ORGANIZATIONS_CLIENT = boto3.client("organizations")
ORGANIZATIONS_CLIENT = boto3.client("organizations", config=BOTO_ORG_CONFIG)
TAGGING_CLIENT = boto3.client("resourcegroupstaggingapi")
CODEPIPELINE_CLIENT = boto3.client("codepipeline")

Expand Down
5 changes: 5 additions & 0 deletions src/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,11 @@ Resources:
"TimeoutSeconds": 300,
"Retry": [
{
"ErrorEquals": ["States.TaskFailed"],
"IntervalSeconds": 3,
"BackoffRate": 2,
"MaxAttempts": 10
}, {
"ErrorEquals": [
"Lambda.Unknown",
"Lambda.ServiceException",
Expand Down