- Newest
- Most votes
- Most comments
Hi there,
Hope you are doing well!
If the key concern is to make sure the Stack Instance[1] of your stackset, basically the individual stack managed by the stackset, can create resources with value based on which account the stack isntance was CURRENTLY deployed into, there is a straight forward feature Pseudo parameters reference AWS::AccountId you can leverage.
For instance, in the template, you can simply assign current account ID value with !Ref intrinsic function[3]:
JSON: "ExternalID" : { "Ref" : "AWS::AccountId" }
YAML: ExternalID: Ref: AWS::AccountId
In this approach, no SSM parameters and Dynamic References need to be involved.
Regards.
References: [1] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stacksets-concepts-stackinstances [2] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html#cfn-pseudo-param-accountid
Relevant content
- Accepted Answerasked 17 days ago
- asked 7 months ago
- asked 24 days ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 years ago