[Migrated] botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the GetFunction operation: Function not found
Originally from: https://github.com/Miserlou/Zappa/issues/1656 by starkdigitalmediaservices
While running the deploy Zappa we are facing issue for the resource not found.
Context
Traceback (most recent call last): File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/zappa/cli.py", line 745, in deploy function_name=self.lambda_name) File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/zappa/core.py", line 1237, in get_lambda_function FunctionName=function_name) File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/botocore/client.py", line 320, in apicall return self.makeapi_call(operation_name, kwargs) File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/botocore/client.py", line 623, in makeapi_call raise error_class(parsed_response, operation_name) botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the GetFunction operation: Function not found: arn:aws:lambda:us-west-2:335794645470:function:myproject-dev During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/zappa/cli.py", line 2710, in handle sys.exit(cli.handle()) File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/zappa/cli.py", line 508, in handle self.dispatch_command(self.command, stage) File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/zappa/cli.py", line 545, in dispatch_command self.deploy(self.vargs['zip']) File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/zappa/cli.py", line 775, in deploy self.lambda_arn = self.zappa.create_lambda_function(kwargs) File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/zappa/core.py", line 1045, in create_lambda_function self.get_credentials_arn() File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/zappa/core.py", line 2251, in get_credentials_arn self.credentials_arn = role.arn File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/boto3/resources/factory.py", line 339, in property_loader self.load() File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/boto3/resources/factory.py", line 505, in do_action response = action(self, args, *kwargs) File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/boto3/resources/action.py", line 83, in call response = getattr(parent.meta.client, operation_name)(params) File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/botocore/client.py", line 320, in apicall return self.makeapi_call(operation_name, kwargs) File "/home/stark/machinetest/myenv/lib/python3.6/site-packages/botocore/client.py", line 623, in makeapi_call raise error_class(parsed_response, operation_name) botocore.errorfactory.NoSuchEntityException: An error occurred (NoSuchEntity) when calling the GetRole operation: The role with name MyLambdaRole cannot be found.
Expected Behavior
It should run properly
Actual Behavior
getting error
Possible Fix
No idea
Your Environment
- Zappa version used: 0.47.0
- Operating System and Python version: Ubuntu - 3.6
facing the same issue did you find any fix?
Hi @sridhar562345 You can give your deployment user Lambda Create and Execute permission and see if it works. Also, this SO answer might help you Here
did you manage to fix this?
fixed this by deploying again. I guess it's a racing issue with the IAM roles?
Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.
Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.