Why doesn't cloudformation support ZipFile for golang lambdas?
It's really painful that CloudFormation won't let me declare a lambda as a ZipFile:
Resource handler returned message: "Invalid request provided: The ZipFile attribute is not supported for the runtime 'go1.x'"
Why should it care that the content of the .zip is go? It's just an executable.
The problem is there's no clean workaround. I was going down a path of uploading the .zip separately but the problem there is if the filename (s3 key) doesn't change then CloudFormation won't think it needs an update. I can generate a random file name (s3 key) every time but that has to be passed into using
--parameter-overrides which also is a little messy. It's sort of compounded by the problem that the aws sdk for go has no support for packaging stacks directly from go.
I guess this is the way it is, but go definitely is a second class citizen here, so my main question is will it always be this way?
ZipFile attribute in CloudFormation only works with scripted language runtimes nodejs and python, since CloudFormation does not / cannot do the "compile" step for you. The clean way is to use
S3Key as you already stated corectly. And then specify new versions with
Resource handler returned message: "AMI cannot be described (Service: AutoScaling, Status Code: 400)asked 2 months ago
AWS Cloudformationasked 23 days ago
CloudFormation stack stuck in UPDATE_COMPLETE_CLEANUP_IN_PROGRESSAccepted Answerasked 7 months ago
Code Style guide for AWS Cloudformation and CDKAccepted Answerasked 7 months ago
Why is there a long delay between CREATE_IN_PROGRESS event for a Lambda-backed CloudFormation custom resource and the Lambda function invocation?Accepted Answerasked 7 months ago
How to troubleshoot Cloudformation "Invalid request provided: AWS::ElasticLoadBalancingV2::ListenerRule Validation exception"?asked 4 months ago
Cloudformation support for creating configurationsasked 3 years ago
Why doesn't cloudformation support ZipFile for golang lambdas?asked 12 days ago
Can we get output from a Lambda function as CloudFormation Parameter?asked 2 years ago
Websockets Golang Exampleasked 3 years ago