awslabs / aws-service-catalog-products

This repository contains a number of CloudFormation templates which can be used independently or as Products with AWS Service Catalog including the Open Source Tools AWS Service Catalog Factory and AWS Service Catalog Puppet. The templates include a number of the foundational AWS Services you may choose to manage Account Compliance including AWS Config, AWS CloudTrail and GuardDuty
MIT No Attribution
162 stars 36 forks source link

Standard Expression failure in servicecatalog-tools--StartCDKDeploy code #85

Open CrazyCatMandy opened 2 years ago

CrazyCatMandy commented 2 years ago

When trying to run the install of a cdk package through service catalog using the supplied tools there are issues with the integration with crhelper.

Firstly, as crhelper is not on AWS as a standard layer the code does not work out of the box. It would be helpful to either provide information about the creation of a lambda layer (with a variable of that lambda layer to pass in, and preferably instructions for IaC rather than console) or to provide the correct version of crhelper that should be used as part of the package to be deployed.

The main issue, however, is the integration between the lambda and crhelper. In crhelper code file resource_helper.py for version 2.0.10 line 271 a variable ScheduledExpression is set using the value of polling_interval from the CfnResource class definition. At the top of the lambda servicecatalog-tools--StartCDKDeploy helper is set to be the CfnResource but with a polling_interval=1 This results in the following: ScheduleExpression='rate(1 minutes)' Notice the pleural of minutes is still there. This causes an issue as follows: image

I have not come across a version of crhelper which deals with this more effectively so the easiest work around for this is to set the polling_interval to be 2 instead at the top of the Lambda.