From 8cd923c8fee82803354c84b4535539da93f797a7 Mon Sep 17 00:00:00 2001 From: Roman Volykh Date: Thu, 18 Dec 2025 17:55:35 +0200 Subject: [PATCH] feat: Add throttling to API Gateway methods --- infra/modules/api/main.tf | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/infra/modules/api/main.tf b/infra/modules/api/main.tf index 93a3ef1..0753c25 100644 --- a/infra/modules/api/main.tf +++ b/infra/modules/api/main.tf @@ -128,3 +128,16 @@ resource "aws_api_gateway_stage" "this" { aws_api_gateway_account.this, ] } + +resource "aws_api_gateway_method_settings" "this" { + rest_api_id = aws_api_gateway_rest_api.this.id + stage_name = aws_api_gateway_stage.this.stage_name + method_path = "*/*" + + settings { + logging_level = "INFO" + metrics_enabled = true + throttling_rate_limit = 20 + throttling_burst_limit = 10 + } +}