Nice article. I did not know about the "aws_serverlessapplicationrepository_cloudformation_stack" Terraform resource, that is really interesting. I couldn't find much documentation on it myself besides what was already on the Terraform registry. But the clue that you left about it using CloudFormation under the hood was helpful. Ultimately, I think preparing the layer deployment package manually is the best way and that is how I will go about it for my deployment. I do wish that the AWS sdk/cli upload limit on the deployment package size was larger than 50 MB, really limiting. For packages larger than this limit, I've just decided to create the layer from the AWS console first. Then specify the layer arn in the function's resource block.