Most of the SAM examples are using a Lambda container with 512Mb by default. The memory size defines the Lambda container size, incl. CPU power (see https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html) We should use the smallest possible container size (128Mb) to minimize runtime costs for AWS customers