I have an AWS Lambda deployed that is triggered when messages are enqueued into a RabbitMQ queue using Amazon MQ trigger. While this works in general, sometimes the MQ trigger gets disabled and needs a manual re-enabling to work properly. These are some relavant policies attached to the lambda role.
Policies:
- Version: '2012-10-17'
Statement:
- Effect: Allow
Resource: '*'
Action:
- mq:DescribeBroker
- secretsmanager:GetSecretValue
- ec2:CreateNetworkInterface
- ec2:DescribeNetworkInterfaces
- ec2:DescribeVpcs
- ec2:DeleteNetworkInterface
- ec2:DescribeSubnets
- ec2:DescribeSecurityGroups
...
How can this issue be fixed? Any help is much appreciated. Thanks.