File tree Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Expand file tree Collapse file tree 3 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## Unreleased
9
+
10
+ ### Added
11
+
12
+ - new check: lambda_function_storage
13
+
8
14
## [ 1.6.0] - 2021-04-30
9
15
10
16
### Added
Original file line number Diff line number Diff line change 10
10
from .elasticbeanstalk import *
11
11
from .elb import *
12
12
from .iam import *
13
+ from .lambdas import *
13
14
from .route53 import *
14
15
from .route53resolver import *
15
16
from .s3 import *
18
19
from .vpc import *
19
20
from .quota_check import QuotaCheck
20
21
22
+
21
23
def __all_subclasses (cls ):
22
24
return set (cls .__subclasses__ ()).union (
23
- [s for c in cls .__subclasses__ () for s in __all_subclasses (c )])
25
+ [s for c in cls .__subclasses__ () for s in __all_subclasses (c )]
26
+ )
27
+
24
28
25
- ALL_CHECKS = sorted ([clazz for clazz in __all_subclasses (QuotaCheck ) if clazz != InstanceQuotaCheck ], key = lambda clz : clz .key )
29
+ ALL_CHECKS = sorted (
30
+ [clazz for clazz in __all_subclasses (QuotaCheck ) if clazz != InstanceQuotaCheck ],
31
+ key = lambda clz : clz .key ,
32
+ )
26
33
ALL_INSTANCE_SCOPED_CHECKS = filter (lambda check : check .scope == QuotaScope .INSTANCE , ALL_CHECKS )
Original file line number Diff line number Diff line change
1
+ from .quota_check import QuotaCheck , QuotaScope
2
+
3
+
4
+ class FunctionAndLayerStorageCheck (QuotaCheck ):
5
+ key = "lambda_function_storage"
6
+ description = "Lambda function and layer storage"
7
+ scope = QuotaScope .REGION
8
+ service_code = 'lambda'
9
+ quota_code = 'L-2ACBD22F'
10
+
11
+ @property
12
+ def current (self ):
13
+ return (
14
+ self .boto_session .client ('lambda' ).get_account_settings ()['AccountUsage' ][
15
+ 'TotalCodeSize'
16
+ ]
17
+ / 1000000000
18
+ )
You can’t perform that action at this time.
0 commit comments