aws-samples / aws-secure-environment-accelerator

The AWS Secure Environment Accelerator is a tool designed to help deploy and operate secure multi-account, multi-region AWS environments on an ongoing basis. The power of the solution is the configuration file which enables the completely automated deployment of customizable architectures within AWS without changing a single line of code.
Apache License 2.0
725 stars 233 forks source link

[BUG][Functional] ACM Import Custom Lambda references Physical ID instead of Secret Value causing lookup failure. #1152

Open rjjaegeraws opened 1 year ago

rjjaegeraws commented 1 year ago

Bug reports which fail to provide the required information will be closed without action.

Required Basic Info

Describe the bug

The ACM Custom CFN Resource uses its PhysicalResourceId to determine if there is an existing ACM Cert or not. On CFN resource creation, the PhysicalId would be undefined (expected) and a new ACM cert gets created. The created cert's ARN is returned as the PhysicalResourceId. When this custom CFN Resources is updated, the Lambda uses the PhysicalResourceId as the lookup value to the ACM Cert. This fails as the cert isn't created. Note that a Secret is created to contain the ACM ARN.

Failure Info

Required files

Steps To Reproduce

Unknown at this time

Expected behavior A clear and concise description of what you expected to happen.

The ACM Custom CFN Resource (i.e. Lambda) should use the ARN value stored in the related Secret, and not use the unchangeable PhysicalResourceId.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.