mirror of
https://github.com/Sea-Haven-Industries/afterhours-shift-manager.git
synced 2026-10-03 10:23:20 +00:00
INFRA-28: add HTTP API access logging and throttling (audit M-18)
Add AccessLogSettings on the implicit HTTP API stage pointing at a new /aws/apigateway/afterhours-shift-manager log group with 90-day retention, plus DefaultRouteSettings throttling (100 rps / 50 burst). Mirrors the M-18 pattern landed on payments-dashboard.
This commit is contained in:
parent
9bea3ed4c7
commit
057fc816b2
1 changed files with 14 additions and 0 deletions
|
|
@ -21,8 +21,22 @@ Globals:
|
||||||
MemorySize: 1024
|
MemorySize: 1024
|
||||||
Architectures:
|
Architectures:
|
||||||
- arm64
|
- arm64
|
||||||
|
# Access logging + default throttling on the implicit HTTP API (audit M-18).
|
||||||
|
HttpApi:
|
||||||
|
AccessLogSettings:
|
||||||
|
DestinationArn: !GetAtt ApiAccessLogGroup.Arn
|
||||||
|
Format: '{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","requestTime":"$context.requestTime","method":"$context.httpMethod","routeKey":"$context.routeKey","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength","integrationError":"$context.integrationErrorMessage"}'
|
||||||
|
DefaultRouteSettings:
|
||||||
|
ThrottlingBurstLimit: 50
|
||||||
|
ThrottlingRateLimit: 100
|
||||||
|
|
||||||
Resources:
|
Resources:
|
||||||
|
ApiAccessLogGroup:
|
||||||
|
Type: AWS::Logs::LogGroup
|
||||||
|
Properties:
|
||||||
|
LogGroupName: /aws/apigateway/afterhours-shift-manager
|
||||||
|
RetentionInDays: 90
|
||||||
|
|
||||||
# --- Shared Lambda Layer ---
|
# --- Shared Lambda Layer ---
|
||||||
SharedLayer:
|
SharedLayer:
|
||||||
Type: AWS::Serverless::LayerVersion
|
Type: AWS::Serverless::LayerVersion
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue