-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add option for lambda log retention period
- Loading branch information
1 parent
7d8096a
commit 24e5bfa
Showing
4 changed files
with
17 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,7 @@ | |
"Mappings": {}, | ||
"Conditions": { | ||
"Always": { | ||
"Fn::Equals": [ | ||
"1", | ||
"1" | ||
] | ||
"Fn::Equals": ["1", "1"] | ||
} | ||
}, | ||
"Resources": { | ||
|
@@ -28,7 +25,7 @@ | |
} | ||
] | ||
}, | ||
"RetentionInDays": 14 | ||
"RetentionInDays": 30 | ||
} | ||
}, | ||
"MyLambda": { | ||
|
@@ -52,9 +49,7 @@ | |
"FunctionName": "my-function", | ||
"Handler": "index.something", | ||
"KmsKeyArn": "arn:aws:kms:us-east-1:123456789012:key/fake", | ||
"Layers": [ | ||
"arn:aws:fake:layer/abc" | ||
], | ||
"Layers": ["arn:aws:fake:layer/abc"], | ||
"MemorySize": 512, | ||
"ReservedConcurrentExecutions": 10, | ||
"Runtime": "nodejs18.x", | ||
|
@@ -63,12 +58,8 @@ | |
"Mode": "Active" | ||
}, | ||
"VpcConfig": { | ||
"SecurityGroupIds": [ | ||
"sg-12345" | ||
], | ||
"SubnetIds": [ | ||
"fake" | ||
] | ||
"SecurityGroupIds": ["sg-12345"], | ||
"SubnetIds": ["fake"] | ||
}, | ||
"Tags": [ | ||
{ | ||
|
@@ -77,10 +68,7 @@ | |
} | ||
], | ||
"Role": { | ||
"Fn::GetAtt": [ | ||
"MyLambdaRole", | ||
"Arn" | ||
] | ||
"Fn::GetAtt": ["MyLambdaRole", "Arn"] | ||
} | ||
} | ||
}, | ||
|
@@ -90,9 +78,7 @@ | |
"Properties": { | ||
"AlarmName": "my-alarm", | ||
"AlarmDescription": "some alarm", | ||
"AlarmActions": [ | ||
"[email protected]" | ||
], | ||
"AlarmActions": ["[email protected]"], | ||
"Period": 120, | ||
"EvaluationPeriods": 2, | ||
"DatapointsToAlarm": 1, | ||
|
@@ -101,9 +87,7 @@ | |
"ComparisonOperator": "LessThanThreshold", | ||
"TreatMissingData": "breaching", | ||
"EvaluateLowSampleCountPercentile": "ignore", | ||
"OKActions": [ | ||
"[email protected]" | ||
], | ||
"OKActions": ["[email protected]"], | ||
"Namespace": "AWS/Lambda", | ||
"Dimensions": [ | ||
{ | ||
|
@@ -134,10 +118,7 @@ | |
"Effect": "Allow", | ||
"Action": "logs:*", | ||
"Resource": { | ||
"Fn::GetAtt": [ | ||
"MyLambdaLogs", | ||
"Arn" | ||
] | ||
"Fn::GetAtt": ["MyLambdaLogs", "Arn"] | ||
} | ||
} | ||
] | ||
|
@@ -180,4 +161,4 @@ | |
} | ||
}, | ||
"Outputs": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,7 +190,8 @@ test('[shortcuts] lambda', (assert) => { | |
TreatMissingData: 'breaching', | ||
EvaluateLowSampleCountPercentile: 'ignore', | ||
ExtendedStatistics: 'p100', | ||
OKActions: ['[email protected]'] | ||
OKActions: ['[email protected]'], | ||
LogRetentionInDays: 30 | ||
}); | ||
|
||
template = cf.merge( | ||
|