Practice free →
HomeAWS Developer Associatecloudcomputingawsdevtroubleshooting › A serverless app's Lambda functions are billed p…

A serverless app's Lambda functions are billed per-millisecond. Which cost-optimization step has the BIGGEST impact on functions whose runtime is dominated by waiting for I/O (DB queries, HTTP calls)?

ATriple the function's memory unconditionally
BDisable CloudWatch logs
CSwitch the function language from Python to Java
DOptimise the downstream calls (e.g. add connection reuse via RDS Proxy / HTTP keep-alive) so total runtime shrinks
Answer & Solution
Correct answer: D. Optimise the downstream calls (e.g. add connection reuse via RDS Proxy / HTTP keep-alive) so total runtime shrinks
I/O-bound functions wait on the network; cutting that wait (RDS Proxy reuses DB connections, HTTP keep-alive avoids handshake) directly reduces billed ms. More memory helps CPU-bound work. Language switch is orthogonal. Disabling logs cripples ops.
Solve this in the app — AWS Developer Associate practice & 24k+ MCQs →
Related questions