Skip to content

Commit

Permalink
fix: combine resource policy for service quota limit (#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjfrench authored Sep 16, 2024
1 parent 60224f1 commit 0683e88
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions stack/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,19 @@ def __init__(
tls_security_policy=opensearch.TLSSecurityPolicy.TLS_1_2, # [Opensearch.8]
)

apt_opensearch_policy_statement = iam.PolicyStatement(
effect=iam.Effect.ALLOW,
principals=[iam.ServicePrincipal("es.amazonaws.com")],
actions=["logs:PutLogEvents", "logs:CreateLogStream"],
resources=[
app_log.log_group_arn,
audit_log.log_group_arn,
],
)

app_log.add_to_resource_policy(apt_opensearch_policy_statement)
audit_log.add_to_resource_policy(apt_opensearch_policy_statement)

ses_access = iam.PolicyStatement(actions=["ses:SendEmail"], resources=["*"])
sqs_access = iam.PolicyStatement(actions=["sqs:SendMessage"], resources=["*"])

Expand Down

0 comments on commit 0683e88

Please sign in to comment.