Search code examples
amazon-web-servicesmachine-learningaws-lambdaaws-code-deployamazon-efs

Failed to create functions during sam deploy


I am creating a project in cloud9 with AWS Lambda and Amazon EFS resources so that users can use a machine learning model.

I was able to build the project successfully, but no matter what I do, sam deploy --guided fail and error message is:

Error: Failed to create/update the stack: sam4-app, Waiter StackCreateComplete failed: Waiter encountered a terminal failure state: For expression "Stacks[].StackStatus" we matched expected path: "ROLLBACK_COMPLETE" at least once.

In the aws cloudFormation console, I found that the creation of my two functions failed

cloudFormation

I am sure I am doing something wrong, yet after so much struggle I have not been able to identify my mistake.

Do I need to make any changes inside the template.yml in order to use AWS Lambda?

It is important to mention that I am taking as reference multiple machine learning models for inference on AWS Lambda and Amazon EFS

Also I have dumb question, I am using windows inside cloud9, could this be causing this error?


Solution

  • You are trying to use too much memory. You are trying to provision 5000MB for your function. While a limit of 10GB is now possible in some regions, it isn't supported in all regions. In the regions where 10GB is not supported, the old 3008MB limit applies.