1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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
Contenus pertinents
- demandé il y a un an
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 9 mois
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
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!