Skip to content

Commit f905c89

Browse files
committed
fix issues for isort linting
1 parent 18c65f8 commit f905c89

File tree

22 files changed

+75
-82
lines changed

22 files changed

+75
-82
lines changed

aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_cloudwatch_endpoints/app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
88
SPDX-License-Identifier: MIT-0
99
"""
10-
from typing import Any
11-
import boto3
1210
import json
13-
import os
1411
import logging
12+
import os
13+
from typing import Any
14+
15+
import boto3
1516

1617
# Setup Default Logger
1718
LOGGER = logging.getLogger(__name__)

aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_eval_job_bucket/app.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
88
SPDX-License-Identifier: MIT-0
99
"""
10+
import ast
11+
import logging
12+
import os
13+
from datetime import datetime
1014
from typing import Any
15+
1116
import boto3
1217
from botocore.exceptions import ClientError
13-
from datetime import datetime
14-
import logging
15-
import os
16-
import ast
1718

1819
# Set to True to get the lambda to assume the Role attached on the Config Service (useful for cross-account).
1920
ASSUME_ROLE_MODE = False

aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_guardrail_encryption/app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
88
SPDX-License-Identifier: MIT-0
99
"""
10-
from typing import Any
11-
import boto3
1210
import json
13-
import os
1411
import logging
12+
import os
13+
from typing import Any
14+
15+
import boto3
1516

1617
# Setup Default Logger
1718
LOGGER = logging.getLogger(__name__)

aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_guardrails/app.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
88
SPDX-License-Identifier: MIT-0
99
"""
10-
from typing import Any
11-
import boto3
12-
import json
13-
from datetime import datetime
1410
import ast
11+
import json
1512
import logging
1613
import os
14+
from datetime import datetime
15+
from typing import Any
16+
17+
import boto3
1718

1819
# Setup Default Logger
1920
LOGGER = logging.getLogger(__name__)

aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_iam_user_access/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
88
SPDX-License-Identifier: MIT-0
99
"""
10-
from typing import Any
11-
import boto3
1210
import json
1311
import logging
1412
import os
13+
from typing import Any
14+
15+
import boto3
1516

1617
# Set to True to get the lambda to assume the Role attached on the Config Service (useful for cross-account).
1718
ASSUME_ROLE_MODE = False

aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_invocation_log_cloudwatch/app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
88
SPDX-License-Identifier: MIT-0
99
"""
10-
from typing import Any
11-
import boto3
1210
import json
13-
import os
1411
import logging
12+
import os
13+
from typing import Any
14+
15+
import boto3
1516

1617
# Setup Default Logger
1718
LOGGER = logging.getLogger(__name__)

aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_invocation_log_s3/app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
88
SPDX-License-Identifier: MIT-0
99
"""
10-
from typing import Any
11-
import boto3
1210
import json
13-
import os
1411
import logging
12+
import os
13+
from typing import Any
14+
15+
import boto3
1516
import botocore
1617
import botocore.exceptions
1718

aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_s3_endpoints/app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@
88
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
99
SPDX-License-Identifier: MIT-0
1010
"""
11-
from typing import Any
12-
import boto3
1311
import json
14-
import os
1512
import logging
13+
import os
14+
from typing import Any
15+
16+
import boto3
1617

1718
# Setup Default Logger
1819
LOGGER = logging.getLogger(__name__)

aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_vpc_endpoints/app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
88
SPDX-License-Identifier: MIT-0
99
"""
10-
from typing import Any
11-
import boto3
1210
import json
13-
import os
1411
import logging
12+
import os
13+
from typing import Any
14+
15+
import boto3
1516

1617
# Setup Default Logger
1718
LOGGER = logging.getLogger(__name__)

aws_sra_examples/solutions/genai/bedrock_org/lambda/src/app.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,27 @@
99
SPDX-License-Identifier: MIT-0
1010
"""
1111
import copy
12-
from datetime import datetime
1312
import json
14-
import os
1513
import logging
16-
from pathlib import Path
14+
import os
1715
import re
16+
from datetime import datetime
17+
from pathlib import Path
18+
from typing import Any, Dict, List, Literal, Optional
19+
1820
import boto3
1921
import cfnresponse
20-
21-
import sra_s3
22-
import sra_repo
23-
import sra_ssm_params
24-
import sra_iam
22+
import sra_cloudwatch
23+
import sra_config
2524
import sra_dynamodb
26-
import sra_sts
25+
import sra_iam
26+
import sra_kms
2727
import sra_lambda
28+
import sra_repo
29+
import sra_s3
2830
import sra_sns
29-
import sra_config
30-
import sra_cloudwatch
31-
import sra_kms
32-
33-
from typing import Dict, Any, List, Literal, Optional
31+
import sra_ssm_params
32+
import sra_sts
3433

3534
# TODO(liamschn): deploy example bedrock guardrail
3635
# TODO(liamschn): deploy example iam role(s) and policy(ies) - lower priority/not necessary?

0 commit comments

Comments
 (0)