1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
2
Hi, @learning
You can simply create a LogGroup with the function name as shown below. Then you can set the log retention freely.
Resources:
TestFunc:
Type: AWS::Serverless::Function
Properties:
FunctionName: test-func
CodeUri: src/handlers/test_func
Handler: index.handler
Runtime: python3.6
AutoPublishAlias: live
Timeout: 10
MemorySize: 128
TestFuncLogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: !Sub /aws/lambda/${TestFunc}
RetentionInDays: 14
관련 콘텐츠
- AWS 공식업데이트됨 3년 전
- AWS 공식업데이트됨 3년 전
Hi @iwasa, this worked like a charm! I knew it was something like this though I had to fix my indentation to get it working properly. Thanks!