Performance

Performance is one of the tent poles of aws-lite. We take it seriously because we want your applications to be as fast possible.

As such, we regularly test and publish open, reproducible, real-world metrics for every key aspect of performance, comparing aws-lite to AWS’s own aws-sdk (v2) and @aws-sdk (v3). Learn more and view source at the aws-lite performance project on GitHub.

We currently track individual and aggregated performance benchmarking the following AWS service clients: DynamoDB, S3, IAM, CloudFormation, Lambda, and STS.

All metrics are published below (or skip straight to the wrap-up).

Methodology

In addition to publishing our source, raw data, and final results, we believe it’s important to share the details of our performance testing methodology, too. Learn more here.


Stats last updated: 2024-07-26T01:53:02.143Z

Coldstart latency

Coldstart latency measures the impact of each SDK on AWS Lambda coldstarts – the pre-initialization phase where your code payload is loaded into the Lambda micro VM.

In these stats we expect to see lower values for either very small code payloads (such as aws-lite), or scenarios where we are using the AWS SDK included in the Lambda image (e.g. @aws-sdk v3 raw in nodejs20.x). Coldstart latency increases as code payload sizes increase; this is often observed with bundled SDKs.

Benchmark statistics - Coldstart latency
control aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 112.13 121.09 120.77 115.51 120.3 116.47 128.57
stddev 29.01 51.79 38.16 36.46 31.59 30.39 48.5
p50 106.76 114.88 111.8 110.78 118.17 111.6 115.61
p90 137.89 145.17 139.64 131.06 144.29 141.02 166.18
p95 141.45 168.28 185.42 144.24 156.54 148.11 267.42
p99 245.26 290.38 276.25 246.05 238.34 253.4 319.77

Initialization latency

Initialization latency measures the impact of each SDK on the initialization phase of the Lambda lifecycle, including static analysis and execution of any code outside the scope of the Lambda handler.

Here we expect to see relatively similar values, as the performance benchmark has very little static code or init-time execution.

Benchmark statistics - Initialization latency
control aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 133.52 155.03 155.61 152.82 136.93 155.13 154.71
stddev 6.94 6.92 8.16 7.27 5.45 9.76 7.11
p50 133.46 154.63 155.36 151.02 136.66 154.59 154.26
p90 139.68 162.85 162.84 160.35 142.78 165.36 161.59
p95 146.7 164.67 167.88 167.76 146.36 167.77 167.03
p99 153.35 171.48 189.41 173.14 151.83 184.14 181.77

Peak memory consumption over Lambda baseline

Peak memory consumption measures each SDK’s peak memory usage throughout import / require, instantiation, read, and write.

To make it easier to assess the memory impact of each SDK, the graph is presented as a value over (thus, not including) the Lambda Node.js baseline. Baseline memory consumption would be expected to include Node.js itself, Lambda bootstrap processes, etc. The memory baseline used always corresponds to the equivalent peak memory of the control test (e.g. aws-lite peak memory p95 - control peak memory p95 = peak memory over baseline p95).

Benchmark statistics - Peak memory consumption over Lambda baseline
control aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 69.15 95.52 96.02 92.92 116.36 115.58 136.45
stddev 1.25 1.23 1.31 1.48 1.42 1.54 1.39
p50 70 96 96 93 117 115 137
p90 70 97 97 94 118 117 138
p95 70 97 98 95 119 118 138
p99 72 98 98 98 119 119 139

Time to respond, not including coldstart

Time to respond measures the total execution time of each SDK, not including coldstart or initialization. In real-world usage, Lambda coldstarts are usually less common than warm invocations, so this metric illustrates the most common case for most applications.

Results below show aggregate data for sequentially executing all six tested clients, followed by individual client response times. (Detailed client statistics can be found here.)

Note: Ideally, response times should be sub-1000ms to ensure fast responses in customer hot-paths. However, the aggregate benchmark simulates importing, instantiating, reading, and writing from six different AWS services in a single execution. When authoring customer-facing business logic, one should ideally utilize fewer services and/or calls to maintain a high degree of customer performance.

Benchmark statistics - Time to respond, not including coldstart
control aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 0 1325.34 1463.45 2549.5 2459.25 2220.83 2738.73
stddev 0 222.66 1590.2 2686.83 127.44 1584.47 156.38
p50 0 1290 1286 2023 2427 2029 2698
p90 0 1423 1437 2337 2611 2245 2893
p95 0 1485 1548 2608 2672 2356 2997
p99 0 1748 1821 17702 2899 2622 3443

Individual client response times

Benchmark statistics - Time to respond, not including coldstart (DynamoDB) Benchmark statistics - Time to respond, not including coldstart (S3) Benchmark statistics - Time to respond, not including coldstart (IAM) Benchmark statistics - Time to respond, not including coldstart (CloudFormation) Benchmark statistics - Time to respond, not including coldstart (Lambda) Benchmark statistics - Time to respond, not including coldstart (STS)

Total time to respond, including coldstart

Total time to respond measures the total execution time of each SDK, including coldstart or initialization. In real-world usage, this metric represents a normalized “worst case” response time.

Note: Ideally, response times should be sub-1000ms to ensure fast responses in customer hot-paths. However, the aggregate benchmark simulates importing, instantiating, reading, and writing from six different AWS services in a single execution. When authoring customer-facing business logic, one should ideally utilize fewer services and/or calls to maintain a high degree of customer performance.

Benchmark statistics - Total time to respond, including coldstart
control aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 245.65 1601.46 1739.83 2817.83 2716.48 2492.43 3022.01
stddev 29.74 229.8 1588.23 2689.86 136.14 1585.65 158.74
p50 242 1560 1556 2303 2689 2303 2992
p90 272 1729 1706 2589 2867 2575 3186
p95 283 1869 1828 2892 2916 2607 3335
p99 377 2040 2103 17989 3165 2869 3695

Client metrics

Performance criteria

Each SDK client is measured on the following criteria:

  • Import / require - Measurement of the impact of importing / requiring each SDK client.
    • It is important to note that import / require times are tied to individual services. In real world use your business logic may rely on multiple AWS services – each of which necessitating additional imports, thereby compounding overall response latency.
    • Ideally, all import / require operations should be sub-100ms to ensure fast responses in customer hot-paths.
  • Instantiate - Measurement of the impact of instantiating a new SDK client – a necessary step before making any service API calls. Ideally all operations should be sub-50ms to ensure fast responses in customer hot-paths.
  • Read - Measurement of a simple read operation to a service API. All reads are identical across SDKs.
  • Write - Measurement of a simple write operation to a service API. All writes are identical across SDKs.
    • Note: some clients may be read-only, based on the service in question (example: STS).
  • Total - Measurement of the total latency associated with all the above operations, thereby demonstrating the overall impact of using a given SDK client.

CloudFormation

Import / require

Benchmark statistics - Import / require CloudFormation
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 5.16 4.06 1.16 56.74 73.77 254.48
stddev 1.26 0.66 0.39 6.11 7.33 26.02
p50 5 4 1 59 73 260
p90 6 5 2 62 82 277
p95 6 5 2 63 85 284
p99 6 5 2 73 90 323

Instantiate

Benchmark statistics - Instantiate a CloudFormation client
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 0.79 0.75 6.4 20.01 1.66 12.37
stddev 0.43 0.43 1.79 5.08 0.53 9.62
p50 1 1 6 21 2 7
p90 1 1 8 24 2 21
p95 1 1 8 26 2 40
p99 1 1 16 27 2 41

Read

Here we measure the latency associated with listing a single CloudFormation stack’s resources (ListStackResources()), and parsing and returning results.

Benchmark statistics - CloudFormation - read one stack
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 59.97 56.84 64.58 87.86 68.26 104.15
stddev 9.97 9 12.39 12.69 12.23 17.15
p50 58 55 62 84 66 98
p90 72 69 78 101 79 124
p95 77 72 85 110 89 138
p99 91 89 107 135 118 156

Write

Here we measure the latency associated with updating a single CloudFormation stack’s configuration (UpdateTerminationProtection()). This method was selected specifically to help limit the impact of stack update latency, which can be highly variable, from benchmarking routines.

Benchmark statistics - CloudFormation - write one stack
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 49.34 48.06 64.8 87.9 49.9 52.31
stddev 14.82 13.31 12.86 28.81 11.29 10.12
p50 44 44 60 77 46 49
p90 63 61 77 136 64 60
p95 82 70 92 146 70 75
p99 116 113 116 162 87 90

Total

Benchmark statistics - CloudFormation - time to execute, not including coldstart
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 115.39 109.93 137.42 261.97 196.12 439.57
stddev 21.03 17.6 18.3 29.85 19.69 26.87
p50 109 105 135 253 192 431
p90 136 129 159 306 220 472
p95 157 149 172 313 237 501
p99 195 168 187 321 255 525

DynamoDB

Import / require

Benchmark statistics - Import / require DynamoDB
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 63.88 56.84 250.39 116.9 356.8 243.88
stddev 5.99 6.52 15.25 14.21 20.03 10.72
p50 65 56 250 115 356 242
p90 72 60 262 124 377 257
p95 73 63 264 125 382 261
p99 77 73 290 128 412 271

Instantiate

Benchmark statistics - Instantiate a DynamoDB client
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 3.01 3.27 21.83 21.31 12.86 13.77
stddev 2.1 2.37 4.09 4.19 5.29 11.85
p50 3 3 21 22 17 9
p90 3 3 25 24 18 20
p95 3 7 33 25 18 20
p99 13 13 34 36 19 21

Read

Here we measure the latency associated with getting a single 100KB row from DynamoDB (GetItem()), and parsing and returning results.

Benchmark statistics - DynamoDB - read one 100KB row
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 149.71 128.94 107.6 176.6 142.28 151.51
stddev 198.2 9.46 11.3 9.96 8.22 8.07
p50 129 128 103 178 140 149
p90 135 137 121 185 153 161
p95 141 141 136 195 156 166
p99 153 149 138 198 167 175

Write

Here we measure the latency associated with writing a single 100KB row into DynamoDB (PutItem()).

Benchmark statistics - DynamoDB - write one 100KB row
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 20.19 19.08 52.15 49.77 23.47 35.38
stddev 15.37 11.14 13.84 14.15 13.87 15.15
p50 15 15 48 46 17 29
p90 26 26 65 60 29 72
p95 59 30 86 85 61 75
p99 75 69 100 100 68 76

Total

Benchmark statistics - DynamoDB - time to execute, not including coldstart
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 242.53 214 442.49 372.26 543.51 461.31
stddev 198.6 18.44 26.64 22.33 32.86 25.02
p50 219 210 440 370 539 457
p90 253 232 486 396 582 498
p95 264 257 501 406 602 505
p99 281 277 502 435 617 537

IAM

Import / require

Benchmark statistics - Import / require IAM
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 11.37 11.8 1.51 58.03 102.94 235.81
stddev 1.65 1.11 0.87 10.46 10.05 12.05
p50 11 12 1 54 103 235
p90 12 12 2 64 113 247
p95 12 13 2 66 116 250
p99 12 17 4 113 129 281

Instantiate

Benchmark statistics - Instantiate an IAM client
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 2.13 5.65 26.99 24.58 1.86 9.55
stddev 0.34 5.46 19.29 7.34 1.11 5.69
p50 2 3 18 23 2 7
p90 3 16 58 38 2 18
p95 3 20 63 41 2 20
p99 3 21 64 42 3 21

Read

Here we measure the latency associated with getting a single role from IAM (GetRole()), and parsing and returning results.

Benchmark statistics - IAM - read one role
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 310.28 463.92 320.57 324.18 471.27 331.53
stddev 10.27 1570.11 19.66 12.74 1578 13.4
p50 310 306 318 323 311 330
p90 321 318 342 338 327 345
p95 325 321 346 341 333 348
p99 343 337 378 361 411 378

Write

Here we measure the latency associated with updating a single IAM role (UpdateRole()).

Benchmark statistics - IAM - write one role
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 98.45 99.03 766.37 298.44 101.68 104.74
stddev 7.56 7.19 2686.91 11 9.9 7.48
p50 96 98 292 298 99 104
p90 109 109 312 312 112 115
p95 111 111 323 319 114 117
p99 115 116 15984 324 148 123

Total

Benchmark statistics - IAM - time to execute, not including coldstart
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 426.47 583.39 1119.36 718.97 682.1 690.62
stddev 14.68 1569.89 2684.36 19.57 1577.49 23.2
p50 425 425 649 718 520 687
p90 444 445 693 743 558 718
p95 455 451 713 747 580 728
p99 473 471 16293 770 624 740

Lambda

Import / require

Benchmark statistics - Import / require Lambda
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 5.91 6.72 2.01 55.08 44.94 162.52
stddev 0.72 0.53 1.32 6.55 7.67 6.55
p50 6 7 2 53 46 161
p90 6 7 3 61 55 172
p95 7 7 3 63 57 174
p99 7 8 4 73 59 179

Instantiate

Benchmark statistics - Instantiate a Lambda client
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 1.21 2.04 7.35 13.86 1.78 7.65
stddev 0.41 1.92 3.76 6.62 1.54 4.03
p50 1 1 6 9 2 6
p90 2 3 12 23 2 16
p95 2 4 18 24 2 20
p99 2 11 19 26 12 20

Read

Here we measure the latency associated with getting a single Lambda’s configuration (GetFunctionConfiguration()), and parsing and returning results.

Benchmark statistics - Lambda - read one configuration
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 71.79 66.41 71.83 112.79 72.93 91.4
stddev 25.68 18.96 20.04 36.43 19.22 19.96
p50 69 61 71 113 76 86
p90 102 93 97 174 96 117
p95 116 95 101 180 98 123
p99 147 101 103 214 102 127

Write

Here we measure the latency associated with updating a single Lambda’s configuration (UpdateFunctionConfiguration()).

Benchmark statistics - Lambda - write one configuration
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 135.31 136.23 148.06 149.26 137.32 136.51
stddev 15.73 14.25 14.19 12.84 15.2 11.24
p50 134 134 147 147 135 135
p90 148 149 163 165 154 148
p95 153 158 174 170 163 152
p99 198 187 187 184 185 170

Total

Benchmark statistics - Lambda - time to execute, not including coldstart
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 214.56 211.99 230.65 345.38 262.82 408.85
stddev 28.15 22.94 25.82 41.13 26.68 25.93
p50 215 209 231 345 262 405
p90 250 240 266 408 296 440
p95 258 248 272 417 306 455
p99 289 260 289 435 329 463

S3

Import / require

Benchmark statistics - Import / require S3
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 30.11 30.93 6.42 62.87 171.82 247.3
stddev 5.43 8.94 0.64 5.97 9.64 11.34
p50 32 35 6 62 173 246
p90 35 38 7 69 183 258
p95 35 43 7 75 185 266
p99 36 46 8 80 191 274

Instantiate

Benchmark statistics - Instantiate an S3 client
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 4.52 2.02 15.46 24.66 7.25 11.22
stddev 4.59 0.32 5.15 4.7 4.85 5.35
p50 3 2 16 25 5 7
p90 5 2 20 27 14 17
p95 18 3 20 28 15 18
p99 21 3 31 42 16 20

Read

Here we measure the latency associated with getting a single 1MB object from S3 (GetObject()), and parsing and returning results.

Benchmark statistics - S3 - read one 1MB object
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 75.37 77.19 86.84 98.7 121.5 95.96
stddev 19.39 25.25 15.9 17.81 21.31 22.19
p50 71 69 84 98 119 93
p90 95 106 100 117 147 107
p95 107 119 121 121 161 119
p99 121 153 145 141 200 163

Write

Here we measure the latency associated with writing a single 1MB object into S3 (PutObject()).

Benchmark statistics - S3 - write one 1MB object
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 181.07 192.9 222.95 202.26 174.05 180.51
stddev 77.99 96.33 155.36 110.62 124.89 131.1
p50 161 160 170 167 134 139
p90 250 328 454 308 268 314
p95 294 405 637 440 449 432
p99 496 540 751 637 702 776

Total

Benchmark statistics - S3 - time to execute, not including coldstart
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 298.32 320.54 347.55 406.16 479.82 543.65
stddev 84.28 99.58 157.11 113.59 123.06 144.56
p50 284 290 296 373 440 497
p90 371 451 574 518 581 654
p95 496 529 755 670 762 784
p99 662 676 854 844 1015 1241

STS

Import / require

Benchmark statistics - Import / require STS
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 4.59 2.69 0.23 52.33 21.12 123.63
stddev 4.98 0.46 0.42 6.12 4.61 8.64
p50 4 3 0 51 20 125
p90 4 3 1 59 26 135
p95 5 3 1 60 27 138
p99 26 3 1 61 34 144

Instantiate

Benchmark statistics - Instantiate a STS client
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 0.44 0.45 1.98 3.07 2.22 9.73
stddev 0.5 0.5 0.42 1.62 2.25 5.03
p50 0 0 2 3 2 6
p90 1 1 2 3 2 17
p95 1 1 3 4 3 17
p99 1 1 3 13 12 18

Read

Here we measure the latency associated with reading one identity via STS (GetCallerIdentity()), and parsing and returning results.

Benchmark statistics - STS - read one identity
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 21.85 19.29 269.13 289.21 29.32 53.95
stddev 14.86 5.01 6.81 9.27 4.93 6.06
p50 19 18 270 289 31 54
p90 23 23 277 301 35 60
p95 42 26 280 304 36 61
p99 57 38 283 313 37 64

Total

Benchmark statistics - STS - time to execute, not including coldstart
aws-lite aws-lite (bundled) aws-sdk (v2) aws-sdk (v2, bundled) @aws-sdk (v3) @aws-sdk (v3, bundled)
mean 27.18 22.55 271.44 353.52 55.13 192.82
stddev 15.98 5.07 6.79 10.17 6.2 9.47
p50 23 21 272 354 56 192
p90 45 26 280 364 62 204
p95 54 29 282 367 63 207
p99 61 42 285 379 73 225

Latest data

If you’d like to dig deeper, here’s the data from the latest performance run:

aws-lite is an Apache 2.0-licensed open source project under the umbrella of OpenJS Foundation Architect. aws-lite is not in any way affiliated with Amazon Web Services, Inc. (AWS). All names and trademarks are the property of their respective owners.