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
If you use Zappa for deploying a Lambda which listens to for example EC2 Events from Cloudwatch. The target for the Event Rule gets the lambda arn as Target Id. Which is invalid as it should match the pattern mentioned in the AWS Docs
Expected Behavior
It should work ;-)
Actual Behavior
It doesn't:
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the PutTargets operation: 2 validation errors detected: Value 'arn:aws:lambda:[My-Awesome-Region]:[MY ACCOUNT ID:function:my-function-name' at 'targets.1.member.id' failed to satisfy constraint: Member must satisfy regular expression pattern: [\.\-_A-Za-z0-9]+; Value 'arn:aws:lambda:[My-Awesome-Region]:[MY ACCOUNT ID:function:my-function-name' at 'targets.1.member.id' failed to satisfy constraint: Member must have length less than or equal to 64
Possible Fix
The problem seems to lie in https://github.com/Miserlou/Zappa/blob/d99c193e32733946fb52a4f9b2bdfd1d2929ba49/zappa/utilities.py#L267 where the name is set to the lambda_arn, which is invalid in this case.
Steps to Reproduce
Try to deploy a lambda only project apigateway_enabled: false
Context
If you use Zappa for deploying a Lambda which listens to for example EC2 Events from Cloudwatch. The target for the Event Rule gets the lambda arn as Target Id. Which is invalid as it should match the pattern mentioned in the AWS Docs
Expected Behavior
It should work ;-)
Actual Behavior
It doesn't:
Possible Fix
The problem seems to lie in
https://github.com/Miserlou/Zappa/blob/d99c193e32733946fb52a4f9b2bdfd1d2929ba49/zappa/utilities.py#L267
where the name is set to the lambda_arn, which is invalid in this case.Steps to Reproduce
apigateway_enabled: false
Your Environment
pip freeze
:zappa_settings.yaml
:The text was updated successfully, but these errors were encountered: