Skip to content

Commit 52ab70c

Browse files
committed
Add logs for gateway
1 parent 3ed1f7b commit 52ab70c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

terraform/api_gateway.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ resource "aws_api_gateway_deployment" "api_deployment" {
190190
rest_api_id = aws_api_gateway_rest_api.api.id
191191
}
192192

193+
resource "aws_cloudwatch_log_group" "api_gateway_logs" {
194+
name = "/aws/api-gateway/${aws_api_gateway_rest_api.api.id}"
195+
retention_in_days = 7
196+
}
197+
193198
resource "aws_api_gateway_stage" "api_stage" {
194199
deployment_id = aws_api_gateway_deployment.api_deployment.id
195200
rest_api_id = aws_api_gateway_rest_api.api.id

0 commit comments

Comments
 (0)