You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function status on line 354 of utilities.py does not properly handle the AccessDeniedException from AWS.
def status(self, function):
response = None
LOG.debug("getting status for event source %s", self.arn)
uuid = self._get_uuid(function)
if uuid:
try:
response = self._lambda.call("get_event_source_mapping", UUID=self._get_uuid(function))
LOG.debug(response)
except botocore.exceptions.ClientError:
LOG.debug("event source %s does not exist", self.arn)
response = None
else:
LOG.debug("No UUID for event source %s", self.arn)
return response
If the user does not have permissions to use lambda:GetEventSourceMapping API call then this still says the event source does not exist.
Expected Behavior
The zappa update {{stage}} command should fail and alert the user their permissions are not enough.
Actual Behavior
The program thinks the event source does not exist, tries to create one with the same UUID and then this error is caused:
botocore.errorfactory.ResourceConflictException: An error occurred (ResourceConflictException) when calling the CreateEventSourceMapping operation: An event source mapping with SQS arn (" arn:aws:sqs:us-west-2:<account>:<sqs_name> ") and function (" <function_name> ") already exists. Please update or delete the existing mapping with UUID <uuid>
Steps to Reproduce
Successfully deploy an app with a SQS event source.
Create a user or role with the following AWS permissions:
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.
Context
The function
status
on line 354 ofutilities.py
does not properly handle theAccessDeniedException
from AWS.If the user does not have permissions to use
lambda:GetEventSourceMapping
API call then this still says the event source does not exist.Expected Behavior
The
zappa update {{stage}}
command should fail and alert the user their permissions are not enough.Actual Behavior
The program thinks the event source does not exist, tries to create one with the same UUID and then this error is caused:
Steps to Reproduce
Your Environment
The text was updated successfully, but these errors were encountered: