aws-lite

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-10-02T02:07:37.345Z

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 145.01 140.57 142.09 123.41 147.28 138.36 142.07
stddev 45.2 26.8 31.6 25.26 34.58 27.7 27.46
p50 136.88 135.98 140.57 123.63 140.32 135.14 138.58
p90 163.76 166.56 162.77 141.23 178.94 160.88 165.4
p95 221.42 181.76 184.3 147.8 209.62 172.97 182.33
p99 342.41 232.11 277.8 246.03 283.78 266.94 257.58

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 145.33 170.03 168.65 158.17 149.38 169.81 169.62
stddev 7.19 12.34 11.58 9.39 6.75 10.59 11.57
p50 144.89 167.4 166.91 155.55 149.12 167.41 167.15
p90 151.52 182.29 178.43 169.31 155.55 183.8 181.46
p95 159.16 196.04 189.12 175.85 157.32 192.16 189.9
p99 171.11 218.66 213.88 190.89 173.31 201.58 214.74

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 64.04 90.01 90.76 93.26 111.79 112.33 131.41
stddev 0.49 0.44 0.81 1.05 1.49 1.08 0.71
p50 64 90 91 94 112 112 131
p90 64 90 92 94 113 114 132
p95 64 90 92 94 114 114 133
p99 66 92 93 95 115 115 133

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 1515.44 1525.3 2138.79 2947.4 2365.37 2827.74
stddev 0 1570.25 1538.47 125.95 2640.18 1532.36 177.53
p50 0 1328 1342 2104 2464 2196 2784
p90 0 1515 1549 2302 2618 2332 3050
p95 0 1595 1616 2350 2734 2383 3245
p99 0 2204 1703 2522 17866 3076 3393

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 290.34 1826.04 1836.04 2420.37 3244.06 2673.54 3139.43
stddev 45.76 1572.96 1539.19 128.57 2639.86 1531.87 181.66
p50 280 1637 1661 2383 2763 2490 3095
p90 325 1837 1849 2577 2933 2667 3365
p95 366 1899 1929 2629 3050 2751 3565
p99 488 2482 2030 2786 18137 3381 3735

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.37 4.4 1.26 58.38 80.62 264.51
stddev 1.04 0.66 0.44 8.33 7.78 23.85
p50 5 4 1 60 81 271
p90 6 5 2 65 86 284
p95 6 5 2 73 90 286
p99 9 7 2 83 107 297

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.66 0.82 6.59 20.15 1.58 11.18
stddev 0.47 0.46 2.06 4.92 0.49 10.17
p50 1 1 6 21 2 7
p90 1 1 8 24 2 18
p95 1 1 9 24 2 26
p99 1 1 16 26 2 47

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 51.35 51.58 55.63 81.3 81.21 89.13
stddev 11.35 8.92 9.94 15.6 22.88 12.66
p50 49 49 54 76 83 87
p90 62 62 68 100 110 104
p95 68 65 72 115 123 113
p99 81 82 85 133 134 118

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 39.01 38.17 56.98 82.68 42.3 42.08
stddev 9.42 5.86 12.78 31.31 9.11 8.44
p50 36 36 53 68 40 40
p90 45 43 73 134 50 49
p95 63 49 80 139 56 55
p99 78 62 97 153 78 74

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 96.75 95.24 120.9 252.46 212.35 420.86
stddev 14.46 11.17 17.13 34.04 27.29 22.83
p50 94 93 117 239 215 421
p90 114 107 140 298 244 451
p95 123 114 147 306 254 457
p99 149 135 172 324 268 471

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 68.56 58.87 264.23 119.86 395.81 253.49
stddev 6.13 5.15 16.76 7.7 32.82 13.85
p50 68 57 262 120 390 251
p90 75 66 282 128 423 268
p95 76 67 285 132 442 272
p99 84 72 318 143 550 318

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 2.77 3.63 23.27 21.89 15.36 13.8
stddev 1.14 2.32 5.43 6.09 4.89 5.39
p50 3 3 22 22 18 12
p90 3 4 33 25 19 20
p95 3 5 34 39 19 21
p99 4 14 36 41 21 22

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 136.28 133.64 109.5 182.84 154.71 164.31
stddev 11.09 9.12 10.69 14.57 12.11 27.09
p50 134 132 105 182 152 161
p90 147 145 123 199 166 179
p95 148 151 131 203 179 180
p99 183 170 136 225 194 206

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 23.17 25.77 57.38 53.21 30.97 35.9
stddev 13.4 16.23 17.74 14.94 13.77 12.94
p50 18 19 50 48 29 31
p90 33 58 89 75 36 47
p95 60 68 96 92 68 71
p99 69 74 109 95 85 77

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 235.1 228.02 466.89 384.02 605.87 482.75
stddev 19.93 17.74 30.7 20.74 47.62 35.36
p50 230 224 458 382 596 478
p90 271 259 506 418 647 510
p95 277 263 522 423 680 526
p99 307 269 562 433 817 565

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.36 12.8 1.5 60.94 101.27 241.39
stddev 1.76 3.51 0.5 8.16 6.74 11.62
p50 11 12 1 62 102 242
p90 12 13 2 72 106 253
p95 15 21 2 75 109 263
p99 17 31 2 80 121 272

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.34 6.67 27.24 24.37 1.67 10.35
stddev 1.18 6.53 20.21 7.29 0.51 5.8
p50 2 3 22 23 2 7
p90 3 19 62 37 2 18
p95 3 21 65 41 2 20
p99 7 22 71 44 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 471.1 462.86 323.53 481.9 470.5 336.28
stddev 1569.7 1548.53 21.69 1532.56 1526.44 11.19
p50 312 308 320 325 316 337
p90 332 321 350 348 332 351
p95 336 327 351 358 339 353
p99 338 336 408 380 343 362

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 99.16 96.97 294.63 608.27 101.92 101.36
stddev 6.48 8.78 10.28 2168.53 8.12 7.65
p50 98 95 296 297 101 100
p90 109 108 308 312 111 111
p95 110 111 311 320 113 116
p99 113 115 312 15632 125 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 588.01 583.65 649.42 1188.98 680.56 699.78
stddev 1569.24 1547.53 35.65 2638.03 1527.49 18.77
p50 430 426 652 721 526 699
p90 451 456 686 767 550 722
p95 458 469 692 779 559 734
p99 462 512 745 16126 589 749

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.59 6.73 2.13 57.39 51.33 172.57
stddev 0.69 1.01 0.78 6.63 8.09 10.51
p50 6 7 2 60 50 171
p90 6 7 3 62 59 184
p95 7 7 3 64 64 189
p99 8 9 3 75 74 207

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.16 1.78 8.71 12.77 1.89 8.46
stddev 0.37 1.93 5.52 5.85 1.45 4.87
p50 1 1 6 9 2 6
p90 2 2 17 19 2 18
p95 2 3 18 22 2 20
p99 2 13 21 27 11 21

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 72.77 80.17 77.95 112.55 77.97 96.34
stddev 22.11 22.79 20.18 33.13 23.33 22.27
p50 65 72 71 111 67 90
p90 106 113 113 156 112 129
p95 112 118 114 169 118 133
p99 127 124 119 193 132 142

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 174.4 173.01 190.96 191.87 181.15 176.42
stddev 14.42 12.53 14.99 16.67 17.12 15.72
p50 174 173 191 190 178 174
p90 194 188 207 210 204 196
p95 199 193 217 225 212 199
p99 218 199 227 242 228 212

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 254.28 262.22 281.83 383.83 316.39 463.33
stddev 24.97 26.12 24.55 40.37 30.28 29.33
p50 251 260 280 380 311 457
p90 293 297 317 438 355 504
p95 301 305 323 458 369 515
p99 309 334 343 474 376 527

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 32.81 30.56 6.8 66.09 204.7 254.03
stddev 6.01 10.02 0.94 9.15 15.63 11.3
p50 33 29 7 65 201 253
p90 36 46 7 79 220 270
p95 44 47 8 81 227 272
p99 52 58 9 97 259 280

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 8.93 2.32 16.59 24.89 5.44 12.39
stddev 6.65 1.55 6.4 4.78 4.52 5.8
p50 4 2 15 24 3 8
p90 18 3 25 27 14 18
p95 21 3 30 35 14 19
p99 21 12 33 41 17 22

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 77.98 79.54 93.45 101.06 127.57 104.13
stddev 23.43 24.43 30.92 20.24 18.24 28.64
p50 72 76 85 99 124 98
p90 111 105 115 120 144 122
p95 122 128 127 125 153 134
p99 145 177 229 163 186 183

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 187.86 201.89 214.56 164.72 147.16 180.37
stddev 121.38 104.05 112.54 64.35 99.68 155.05
p50 156 168 175 152 127 131
p90 281 396 375 235 203 248
p95 423 439 462 282 227 673
p99 493 517 595 415 396 721

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 315.15 330.41 346.05 373.61 489.26 559.41
stddev 126.42 111.85 114.76 69.21 100.48 158.93
p50 285 290 304 356 472 504
p90 411 520 511 454 543 680
p95 561 584 572 509 558 1040
p99 600 667 747 645 715 1103

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 3.44 2.61 0.34 55.65 23.71 128.29
stddev 0.61 0.55 0.47 9.3 5.33 9
p50 3 3 0 58 24 127
p90 4 3 1 61 29 140
p95 4 3 1 64 32 141
p99 5 4 1 79 41 149

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.45 0.29 2.13 3.28 1.79 10.3
stddev 0.5 0.45 0.39 2.28 1.86 5.62
p50 0 0 2 3 1 7
p90 1 1 3 3 2 17
p95 1 1 3 4 2 18
p99 1 1 3 13 12 21

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.2 21.7 270.36 294.6 32.54 55.81
stddev 2.86 3.36 6.96 16.9 5.42 7.73
p50 21 22 271 294 32 56
p90 25 25 277 310 39 63
p95 26 27 279 315 42 67
p99 29 34 283 319 45 77

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 25.24 24.75 272.92 363.01 59.7 200.13
stddev 2.97 3.53 6.98 20.53 7.28 12.22
p50 25 24 274 361 58 198
p90 29 28 280 378 70 214
p95 31 30 282 387 72 221
p99 35 38 287 453 81 237

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.