Skip to content

Commit c66b366

Browse files
committed
fix flake8 issues
1 parent 79a0c29 commit c66b366

File tree

1 file changed

+4
-1
lines changed
  • aws_sra_examples/solutions/genai/bedrock_org/lambda/rules/sra_bedrock_check_guardrails

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ def lambda_handler(event: dict, context: Any) -> dict: # noqa: CCR001, C901, U1
9898
LOGGER.warning(f"Guardrail {guardrail_name} (ID: {guardrail_id}) not found")
9999
except ClientError as client_error:
100100
if client_error.response['Error']['Code'] == 'AccessDeniedException':
101-
LOGGER.info(f"Access denied to guardrail {guardrail_name} (ID: {guardrail_id}). If guardrail uses KMS encryption, ensure Lambda's IAM role has permissions to the KMS key.")
101+
LOGGER.info(
102+
f"Access denied to guardrail {guardrail_name} (ID: {guardrail_id}). "
103+
+ "If guardrail uses KMS encryption, ensure Lambda's IAM role has permissions to the KMS key."
104+
)
102105
non_compliant_guardrails[guardrail_name] = ["(access_denied; see log for details)"]
103106
except Exception as e:
104107
LOGGER.error(f"Error checking guardrail {guardrail_name} (ID: {guardrail_id}): {str(e)}")

0 commit comments

Comments
 (0)