Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Implement Log Groups properties for CloudFrontAuthorization (#254)
* Feat: Implement Log Groups properties for CloudFrontAuthorization Logs and naming is currently problematic in CloudFront authorization@edge - lambdas are named with random IDs, making it difficult to identify easily the deployed lambdas - log groups are created without tags and offer no possibilies of setting their retention - logs are impossible to identify: each stack being deployed has random IDs, so not possible to correlate logs easily As LogGroup sucks with CloudFormation, because LogGroup has to be created before the lambda which creates the log group if not present, this MR follows this strategy: - Use a common ResourceSuffix (initialized with the StackId) => Possible not to use an ID but a name for user - Re-Use the suffix for both LogGroupName and Lambda, so IDs are predictable and can be hardcoded for logs - Use default log retention policy of 10 years to avoid bad suprises for existing users * Don't try creating LogGroups This is a lost battle with LambdaEgde as log groups will be created in every region However, we create predictable Lambda Names Use by default AWS::StackId, so there is no clash between 2 launched stacks, but user can choose his own name * feat: Use Condition to set FunctionName and use default existing behaviour --------- Co-authored-by: Pierre Souchay <pierre.souchay@axaclimate.com>