Replies: 5 comments 4 replies
-
I found out why. There was already a function in aws of type zip, and when trying to deploy it gave the error. I needed to remove (sls remove) and then deploy (sls deploy), then it worked. I don't know if this is a bug (serverless or CloudFormation) or if it really is meant to be. However, I don't think it's interesting to remove a function and then add it again. If by any chance it goes bad, the service may be unavailable for a while. Please don't delete this thread as it may help others. I haven't found anything on the internet that has this solution. |
Beta Was this translation helpful? Give feedback.
-
If you switch existing Lambda function from If you don't want to remove the function from If you rename the function in If you add To address all these issues, please apply the next simpler steps:
|
Beta Was this translation helpful? Give feedback.
-
For those who have too many lambdas in one stack and/or want more faster approach compared to @denis-ryzhkov more precise solution: NOTE! This will create new log groups instead of reusing the ones already created. Those of you who want to persist the logs in same log group - You cannot do this. This is more brutal force approach, so you should always test (like everything) in your testing environment first
|
Beta Was this translation helpful? Give feedback.
-
Hi there, I have prepared a demo app for best practice to define lambda and cloudwatch log group and summary in readme. |
Beta Was this translation helpful? Give feedback.
-
Yes, it solves my problem. basically, i was using regular lambada functions previously, now i changed to image-based, it gave me errors. first please delete old ones, by using sls remove. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to deploy this function using an ECR image, but without success. Every time I get the error message: UPDATE_FAILED: FunctionLambdaFunction (AWS::Lambda::Function)
Resource handler returned message: "Invalid request provided: Updating PackageType is not supported"
As I understand it, there are only two values for PackageType: zip or image. But apparently I don't have access to this configuration, the serverless itself does this, correct? Am I doing something wrong or is there a possibility of a bug in the PackageType?
I'm using:
Environment: linux, node 12.22.0, framework 3.7.1 (local) 3.7.1v (global), plugin 6.1.5, SDK 4.3.2
Beta Was this translation helpful? Give feedback.
All reactions