Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: APIGW Access Logs Policy #816

Open
williamputraintan opened this issue Jan 21, 2025 · 0 comments
Open

Chore: APIGW Access Logs Policy #816

williamputraintan opened this issue Jan 21, 2025 · 0 comments

Comments

@williamputraintan
Copy link
Member

williamputraintan commented Jan 21, 2025

We started or could hit the policy size limit again for CloudWatch Logs resources which are limited to 5120 characters. Reported at slack-thread

This happened on the dev env where removed policies didn't get cleaned up properly by CDK (Alexis cleaned this manually in dev account). To future proof from happening again, it seems that API-GW logs should start the prefix with /aws/vendedlogs/ and AWS natively add wildcard to that prefix.

Also, investigate whether the add the write permission on to APIGW could also go as the native policy should cover this?

Another thing to note it seems that the automatic enablement to /aws/vendedlogs/ prefix only appear after it hits the limit.

Ref:

To mitigate this, CloudWatch Logs monitors the size of resource policies used by the service that is sending logs, and when it detects that a policy approaches the size limit of 5120 characters, CloudWatch Logs automatically enables /aws/vendedlogs/* in the resource policy for that service. You can then start using log groups with names that start with /aws/vendedlogs/ as the destinations for logs from these services.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant