I would like to create a lambda and associate it with an AWS Config Rule using lambda ARN via Serverless Framework.
I know Serverless Framework can create AWS resources which are supported by CFN in the “resources” section, theoretically including AWS Config rule, but I have not seen any document about how to set up the dependency between “resources” section and lambda.
The challenge here is in serverless.yml, the lambda is not configured with a logic name. It is dynamically generated after running sls cli , so I am not able to fill in lambda logic name in serverless.yml.
I can see the cfn template created by sls cli use ‘ProcessLambdaFunction’ as lambda logic name, but it is not a nice way to hardcode it into severless.yml. Any better approach?