Files
floci/src/main/java
David ff36141c19 perf(cloudformation): probe Lambda S3 code with headObject, not getObject (#2728)
Resolving an AWS::Lambda::Function whose Code points at S3 checked the
object by calling getObject and discarding the result. S3Object.getData() is
a materialised byte array, so that read the whole package into memory purely
to answer whether it was readable, and LambdaService then read the same
object again for real during CreateFunction. Every stack create or update
paid for two full copies of every Lambda package it provisions.

headObject answers the same question without the body: getObject is
getObjectMetadata plus readFile, headObject is getObjectMetadata alone. Both
resolve the object through that same metadata lookup, so a missing key or
bucket still fails the resource exactly as before, and the failure behaviour
added for #2648 is unchanged.

Closes #2675
2026-08-30 15:03:30 -05:00
..