aws-samples / serverless-patterns
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 418 files with 17,295 lines of code.
    • 0 very long files (0 lines of code)
    • 0 long files (0 lines of code)
    • 6 medium size files (1,390 lines of codeclsfd_ftr_w_mp_ins)
    • 32 small files (4,426 lines of code)
    • 380 very small files (11,479 lines of code)
0% | 0% | 8% | 25% | 66%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
yaml0% | 0% | 14% | 34% | 51%
yml0% | 0% | 23% | 48% | 27%
ts0% | 0% | 0% | 25% | 74%
py0% | 0% | 0% | 8% | 91%
js0% | 0% | 0% | 0% | 100%
cs0% | 0% | 0% | 0% | 100%
graphql0% | 0% | 0% | 0% | 100%
html0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
apigw-http-api-lambda-rds-proxy0% | 0% | 71% | 0% | 28%
apigw-lambda-observability0% | 0% | 93% | 0% | 6%
apigw-websocket-api-lambda0% | 0% | 79% | 0% | 20%
sfn-log-export0% | 0% | 79% | 0% | 20%
apigw-rest-api-batch-sam0% | 0% | 100% | 0% | 0%
apigw-vpclink-pvt-alb0% | 0% | 100% | 0% | 0%
cognito-restapi-vpclink0% | 0% | 0% | 65% | 34%
apigw-websocket-api-sqs-lambda0% | 0% | 0% | 89% | 10%
apigw-s3-cdk0% | 0% | 0% | 96% | 3%
codecommit-s30% | 0% | 0% | 100% | 0%
amplify_cognito_apigateway_lambda_envvariables0% | 0% | 0% | 91% | 8%
apigw-rest-api-dynamodb0% | 0% | 0% | 100% | 0%
appsync-dynamodb-singletable0% | 0% | 0% | 100% | 0%
appsync-dynamodb0% | 0% | 0% | 100% | 0%
apigw-lambda-qldb0% | 0% | 0% | 47% | 52%
apig-waf0% | 0% | 0% | 66% | 33%
cdk-cloudfront-to-s3-and-lambda0% | 0% | 0% | 55% | 44%
apigw-http-api-lambda-rds-proxy-cdk0% | 0% | 0% | 59% | 40%
cdk-eventbridge-appsync-oauth0% | 0% | 0% | 51% | 48%
sfn-glue-sam0% | 0% | 0% | 86% | 13%
iot-mqttoverhttp-customauth0% | 0% | 0% | 96% | 3%
s3-eventbridge0% | 0% | 0% | 100% | 0%
fargate-sns-sqs-cdk0% | 0% | 0% | 66% | 33%
apigw-waf-sam0% | 0% | 0% | 100% | 0%
apigw-canary-deployment-cdk0% | 0% | 0% | 81% | 18%
apigw-eventbridge0% | 0% | 0% | 100% | 0%
eventbridge-cross-region0% | 0% | 0% | 63% | 36%
dynamodb-eventbridge0% | 0% | 0% | 81% | 18%
eventbridge-api-destinations0% | 0% | 0% | 24% | 75%
systems-manager-automation-to-lambda0% | 0% | 0% | 86% | 13%
sfn-sfn0% | 0% | 0% | 100% | 0%
appsync-notify-subscribers-of-database-updates0% | 0% | 0% | 20% | 79%
apigw-to-private-apig-cdk0% | 0% | 0% | 57% | 42%
ta-eventbridge-lambda-s30% | 0% | 0% | 51% | 49%
apigw-rest-apigw-rest0% | 0% | 0% | 64% | 35%
cdk-eventbridge-appsync0% | 0% | 0% | 80% | 19%
cdk-codecommit-codepipeline-sfn-athena-glue0% | 0% | 0% | 0% | 100%
parallel-e2e-pipeline-cdk0% | 0% | 0% | 0% | 100%
cdk-vpc-lambda-sfn0% | 0% | 0% | 0% | 100%
private-apigw-lambda-cdk0% | 0% | 0% | 0% | 100%
lambda-aurora-serverless0% | 0% | 0% | 0% | 100%
cfn-custom-resource-s3-create0% | 0% | 0% | 0% | 100%
fargate-s3-cdk0% | 0% | 0% | 0% | 100%
sqs-lambda-eb-cdk-python0% | 0% | 0% | 0% | 100%
apigw-lambda-dynamodb-cdk0% | 0% | 0% | 0% | 100%
aurora-serverless-s3-ingestion0% | 0% | 0% | 0% | 100%
cognito-httpapi0% | 0% | 0% | 0% | 100%
appsync-dynamodb-singletable-cdk0% | 0% | 0% | 0% | 100%
cdk-lambda-appsync0% | 0% | 0% | 0% | 100%
lambda-s3-sfn0% | 0% | 0% | 0% | 100%
fargate-sfn-cdk0% | 0% | 0% | 0% | 100%
fargate-sqs-cdk0% | 0% | 0% | 0% | 100%
appsync-direct-lambda-resolver0% | 0% | 0% | 0% | 100%
s3-sqs-lambda0% | 0% | 0% | 0% | 100%
cdk-eventbridge-stepfunction0% | 0% | 0% | 0% | 100%
apigw-sqs-lambda0% | 0% | 0% | 0% | 100%
fargate-aurora-serverless-cdk0% | 0% | 0% | 0% | 100%
apigw-mutualtls-lambda0% | 0% | 0% | 0% | 100%
appsync-express-workflow0% | 0% | 0% | 0% | 100%
lambda-rekognition0% | 0% | 0% | 0% | 100%
lambda-sns-sms-cdk0% | 0% | 0% | 0% | 100%
fargate-eventbridge-cdk0% | 0% | 0% | 0% | 100%
fargate-dynamodb-cdk0% | 0% | 0% | 0% | 100%
s3-object-lambda0% | 0% | 0% | 0% | 100%
lambda-efs-cdk0% | 0% | 0% | 0% | 100%
apigw-rest-stepfunction0% | 0% | 0% | 0% | 100%
apigw-http-api-eventbridge-dotnet-cdk0% | 0% | 0% | 0% | 100%
xray-lambdalayers-cdk-python0% | 0% | 0% | 0% | 100%
apigw-rest-api-eventbridge-sam0% | 0% | 0% | 0% | 100%
fargate-sns-cdk0% | 0% | 0% | 0% | 100%
dynamodb-streams-lambda-event-filters0% | 0% | 0% | 0% | 100%
sfn-callback-cdk0% | 0% | 0% | 0% | 100%
apigw-sfn0% | 0% | 0% | 0% | 100%
s3-lambda0% | 0% | 0% | 0% | 100%
sfn-dynamodb-cdk0% | 0% | 0% | 0% | 100%
lambda-ssm-parameter0% | 0% | 0% | 0% | 100%
apigw-sns-sqs-lambda-cdk0% | 0% | 0% | 0% | 100%
sfn-apigw0% | 0% | 0% | 0% | 100%
lambda-pinpoint0% | 0% | 0% | 0% | 100%
apigw-fargate-cdk0% | 0% | 0% | 0% | 100%
lambda-lambda0% | 0% | 0% | 0% | 100%
sfn-dynamodb0% | 0% | 0% | 0% | 100%
apigw-http-api-lambda0% | 0% | 0% | 0% | 100%
apigw-rest-api-dynamodb-cdk0% | 0% | 0% | 0% | 100%
apigw-http-api-eventbridge0% | 0% | 0% | 0% | 100%
cdk-appsync-sqs0% | 0% | 0% | 0% | 100%
apigw-http-api-lambda-cdk0% | 0% | 0% | 0% | 100%
rabbitmq-lambda0% | 0% | 0% | 0% | 100%
lambda-sfn0% | 0% | 0% | 0% | 100%
cdk-appsync-sns0% | 0% | 0% | 0% | 100%
sfn-glue-sync-cdk0% | 0% | 0% | 0% | 100%
cloudfront-cff-s3-cdk-python0% | 0% | 0% | 0% | 100%
sfn-sqs-cdk0% | 0% | 0% | 0% | 100%
sfn-eventbridge0% | 0% | 0% | 0% | 100%
appsync-eventbridge0% | 0% | 0% | 0% | 100%
lambda-ses0% | 0% | 0% | 0% | 100%
apigw-iam0% | 0% | 0% | 0% | 100%
eventbridge-sfn0% | 0% | 0% | 0% | 100%
auroraserverless-secretsmanager0% | 0% | 0% | 0% | 100%
sfn-inside-sfn-cdk-python0% | 0% | 0% | 0% | 100%
sfn-lambda0% | 0% | 0% | 0% | 100%
sns-sqs-cdk0% | 0% | 0% | 0% | 100%
s3-eventbridge-direct0% | 0% | 0% | 0% | 100%
lambda-dynamodb-cdk0% | 0% | 0% | 0% | 100%
sqs-lambda-cdk-python0% | 0% | 0% | 0% | 100%
apigw-http-api-eventbridge-cdk0% | 0% | 0% | 0% | 100%
lambda-dynamodb0% | 0% | 0% | 0% | 100%
lambda-sns-cdk0% | 0% | 0% | 0% | 100%
iot-lambda-cdk0% | 0% | 0% | 0% | 100%
msk-lambda-cdk0% | 0% | 0% | 0% | 100%
lambda-cloudwatch-cdk0% | 0% | 0% | 0% | 100%
cloudfront-lambda-edge-cdk-python0% | 0% | 0% | 0% | 100%
eventbridge-cloudwatch0% | 0% | 0% | 0% | 100%
lambda-sns-sms0% | 0% | 0% | 0% | 100%
lambda-sqs-cdk0% | 0% | 0% | 0% | 100%
sfn-sns0% | 0% | 0% | 0% | 100%
sqs-lambda-cdk0% | 0% | 0% | 0% | 100%
fargate-secretsmanager0% | 0% | 0% | 0% | 100%
sqs-lambda-dynamodb-cdk0% | 0% | 0% | 0% | 100%
apigw-lambda-cdk0% | 0% | 0% | 0% | 100%
sfn-sqs0% | 0% | 0% | 0% | 100%
sfn-s30% | 0% | 0% | 0% | 100%
fargate-cdk0% | 0% | 0% | 0% | 100%
eventbridge-scheduled-lambda-cdk-typescript0% | 0% | 0% | 0% | 100%
sns-sqs0% | 0% | 0% | 0% | 100%
lambda-eventbridge0% | 0% | 0% | 0% | 100%
msk-lambda0% | 0% | 0% | 0% | 100%
lambda-sqs0% | 0% | 0% | 0% | 100%
lambda-sns0% | 0% | 0% | 0% | 100%
eventbridge-lambda-cdk0% | 0% | 0% | 0% | 100%
lambda-cloudwatch0% | 0% | 0% | 0% | 100%
eventbridge-sqs0% | 0% | 0% | 0% | 100%
s3-lambda-cdk0% | 0% | 0% | 0% | 100%
sns-lambda-cdk0% | 0% | 0% | 0% | 100%
dynamodb-lambda-cdk0% | 0% | 0% | 0% | 100%
s3-sqs0% | 0% | 0% | 0% | 100%
sns-lambda0% | 0% | 0% | 0% | 100%
dynamodb-lambda0% | 0% | 0% | 0% | 100%
kinesis-lambda-efo0% | 0% | 0% | 0% | 100%
eventbridge-sns0% | 0% | 0% | 0% | 100%
sqs-lambda0% | 0% | 0% | 0% | 100%
s3-sns0% | 0% | 0% | 0% | 100%
apigw-lambda-dynamodb0% | 0% | 0% | 0% | 100%
eventbridge-cloudwatch-cdk0% | 0% | 0% | 0% | 100%
eventbridge-sns-cdk0% | 0% | 0% | 0% | 100%
eventbridge-sqs-cdk0% | 0% | 0% | 0% | 100%
iot-lambda0% | 0% | 0% | 0% | 100%
kinesis-lambda0% | 0% | 0% | 0% | 100%
lambda-s30% | 0% | 0% | 0% | 100%
eventbridge-lambda0% | 0% | 0% | 0% | 100%
sfn-comprehend-sdk0% | 0% | 0% | 0% | 100%
dynamodb-kinesis-cdk0% | 0% | 0% | 0% | 100%
lambda0% | 0% | 0% | 0% | 100%
dynamodb-kinesis0% | 0% | 0% | 0% | 100%
s3-sqs-cdk0% | 0% | 0% | 0% | 100%
eventbridge-scheduled-lambda0% | 0% | 0% | 0% | 100%
_pattern-model0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
template-rds-proxy.yaml
in apigw-http-api-lambda-rds-proxy
292 -
template.yaml
in apigw-lambda-observability
229 -
template.yml
in apigw-websocket-api-lambda
228 -
template.yaml
in sfn-log-export
226 -
template.yaml
in apigw-rest-api-batch-sam
214 -
template.yml
in apigw-vpclink-pvt-alb
201 -
apigw-s3-cdk-stack.ts
in apigw-s3-cdk/cdk/lib
195 2
template.yaml
in apigw-websocket-api-sqs-lambda
195 -
template.yml
in cognito-restapi-vpclink
193 -
template.yaml
in codecommit-s3
187 -
template.yaml
in amplify_cognito_apigateway_lambda_envvariables
186 -
template.yml
in apigw-rest-api-dynamodb
175 -
template.yaml
in appsync-dynamodb-singletable
174 -
template.yaml
in appsync-dynamodb
165 -
template.yaml
in apigw-lambda-qldb
162 -
ecs.yml
in cognito-restapi-vpclink
159 -
index.ts
in apig-waf/src/waf
156 1
static-site-stack.ts
in cdk-cloudfront-to-s3-and-lambda/cdk/lib
153 1
rds-proxy-sequelize-stack.ts
in apigw-http-api-lambda-rds-proxy-cdk/src/lib
145 1
main.ts
in cdk-eventbridge-appsync-oauth/cdk/lib
144 2
stack.yaml
in sfn-glue-sam/code/cloudformation
142 -
network.yml
in cognito-restapi-vpclink
132 -
template.yaml
in s3-eventbridge
124 -
template.yaml
in iot-mqttoverhttp-customauth
124 -
cdk-stack.ts
in fargate-sns-sqs-cdk/cdk/lib
121 1
template.yaml
in apigw-waf-sam
116 -
template.yml
in apigw-eventbridge
114 -
app.py
in apigw-canary-deployment-cdk
114 2
template.yaml
in eventbridge-cross-region/eventbus-source
113 -
template.yaml
in dynamodb-eventbridge
111 -
mongoDB.yaml
in eventbridge-api-destinations/4-mongodb
107 -
template.yml
in sfn-sfn
104 -
template.yaml
in systems-manager-automation-to-lambda
104 -
index.ts
in apigw-to-private-apig-cdk/src/api
103 1
template.yaml
in appsync-notify-subscribers-of-database-updates/2-eventbridge
103 -
s3_bucket_privatizer_stack.py
in ta-eventbridge-lambda-s3/s3_bucket_privatizer
102 1
template.yaml
in apigw-rest-apigw-rest
102 -
main.ts
in cdk-eventbridge-appsync/cdk/lib
101 1
template.yaml
in apigw-rest-stepfunction
97 -
ZendeskAPIDestination.yaml
in eventbridge-api-destinations/5-zendesk
96 -
end-to-end-tests.ts
in parallel-e2e-pipeline-cdk/src/pipeline/app/constructs
94 2
appsync-cdk-stack.ts
in appsync-dynamodb-singletable-cdk/cdk/lib
94 1
template.yaml
in apigw-rest-api-eventbridge-sam
93 -
template.yml
in appsync-notify-subscribers-of-database-updates/3-lambda
93 -
template.yaml
in apigw-mutualtls-lambda
91 -
template.yaml
in s3-sqs-lambda
90 -
template.yaml
in apigw-sqs-lambda
86 -
template.yaml
in eventbridge-api-destinations/2-slack
85 -
appsync-express-workflow-stack.ts
in appsync-express-workflow/cdk/lib
84 1
template.yaml
in lambda-rekognition
84 -
Files With Most Units (Top 20)
File# lines# units
DataIngest.py
in aurora-serverless-s3-ingestion/cdk/lambda
73 5
lambda_function.py
in lambda-efs-cdk/lambda_function
36 4
s3openbucket.py
in ta-eventbridge-lambda-s3/lambda_functions/s3openbucket
39 4
submit_job.py
in sqs-lambda-eb-cdk-python/lambda
75 4
index.py
in cognito-restapi-vpclink/AuxLambdaFunctionSecGrp
64 4
app.py
in apigw-http-api-lambda-rds-proxy/src
43 3
Function.cs
in apigw-lambda-dynamodb-cdk/cdk/code/src/DynamoDbLambda
33 2
apigw-s3-cdk-stack.ts
in apigw-s3-cdk/cdk/lib
195 2
index.py
in sfn-log-export/src/functions/cloudwatch_snapshot
26 2
main.ts
in cdk-eventbridge-appsync-oauth/cdk/lib
144 2
end-to-end-tests.ts
in parallel-e2e-pipeline-cdk/src/pipeline/app/constructs
94 2
create-person.js
in apigw-lambda-qldb/src
55 2
lambda-handler.py
in xray-lambdalayers-cdk-python/lambda_code
25 2
lambdaUsesApiKey.js
in appsync-notify-subscribers-of-database-updates/3-lambda/src
57 2
app.py
in apigw-canary-deployment-cdk
114 2
cdk-stack.ts
in fargate-sns-sqs-cdk/cdk/lib
121 1
cdk-stack.ts
in lambda-dynamodb-cdk/cdk/lib
28 1
app.ts
in lambda-dynamodb-cdk/cdk/src
24 1
sfn_sqs_cdk_stack.py
in sfn-sqs-cdk/sfn_sqs_cdk
25 1
app.js
in lambda-aurora-serverless/src
81 1
Files With Long Lines (Top 20)

There are 45 files with lines longer than 120 characters. In total, there are 69 long lines.

File# lines# units# long lines
template.yaml
in lambda-s3-sfn
69 - 4
template.yaml
in apigw-lambda-observability
229 - 4
template.yml
in apigw-websocket-api-lambda
228 - 3
template.yml
in apigw-rest-api-dynamodb
175 - 3
s3_bucket_privatizer_stack.py
in ta-eventbridge-lambda-s3/s3_bucket_privatizer
102 1 3
template.yaml
in apigw-http-api-lambda-rds-proxy
70 - 3
stack.yaml
in sfn-glue-sam/code/cloudformation
142 - 3
template.yml
in cognito-restapi-vpclink
193 - 3
index.ts
in apigw-to-private-apig-cdk/src/api
103 1 2
index.ts
in private-apigw-lambda-cdk/src/api
62 1 2
cdk-apigw-sns-sqs-lambda-stack.ts
in apigw-sns-sqs-lambda-cdk/cdk/lib
75 1 2
ApigwHttpApiEventbridgeDotnetCdkStack.cs
in apigw-http-api-eventbridge-dotnet-cdk/src/ApigwHttpApiEventbridgeDotnetCdk
76 1 2
template-rds-proxy.yaml
in apigw-http-api-lambda-rds-proxy
292 - 2
rds-proxy-sequelize-stack.ts
in apigw-http-api-lambda-rds-proxy-cdk/src/lib
145 1 2
app.js
in lambda-aurora-serverless/src
81 1 1
template.yml
in lambda-aurora-serverless
80 - 1
index.html
in cdk-cloudfront-to-s3-and-lambda/web/subdirectory
9 - 1
index.ts
in fargate-aurora-serverless-cdk/cdk/src/src
50 - 1
Function.cs
in apigw-lambda-dynamodb-cdk/cdk/code/src/DynamoDbLambda
33 2 1
GlobalSuppressions.cs
in apigw-lambda-dynamodb-cdk/cdk/src/Cdk
1 - 1