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

account-creation-shared declares account_id early #46

Closed puddleglum1904 closed 3 years ago

puddleglum1904 commented 3 years ago

https://github.com/awslabs/aws-service-catalog-products/blob/master/governance-at-scale-account-factory/account-creation-shared/v3/src/handler.py

The account_id var is declared with the initial response to CreateAccount, which doesn't contain an AccountId field. As a result, a null value is passed on to the downstream bootstrapping, which then fails. The account_id declaration for new accounts should be moved to after the DescribeCreateAccountStatus call.