mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
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