1 Answer
- Newest
- Most votes
- Most comments
0
I was able to replicate a similar error message to yours by using below-mentioned template.
AWSTemplateFormatVersion: 2010-09-09
Description: Testing Distributor
Parameters:
TargetAccountId:
Type: String
Resources:
Distribution:
Type: 'AWS::ImageBuilder::DistributionConfiguration'
Properties:
Name: Multi Region Distributor
Description: Multi Region Distributor
Distributions:
- Region: us-east-1
AmiDistributionConfiguration:
Name: 'AMI-us-east-1 {{ imagebuilder:buildDate }}'
Description: AMI-us-east-1
TargetAccountIds:
- !Ref AWS::AccountId
LaunchTemplateConfigurations:
- AccountId: !Ref AWS::AccountId
LaunchTemplateId: lt-xxxxxxxxxxxxx
SetDefaultVersion: true
- Region: us-east-2
AmiDistributionConfiguration:
Name: 'AMI-us-east-2 {{ imagebuilder:buildDate }}'
Description: AMI-us-east-2
TargetAccountIds:
- !Ref TargetAccountId
# - !Ref AWS::AccountId
LaunchTemplateConfigurations:
- AccountId: !Ref TargetAccountId
LaunchTemplateId: lt-xxxxxxxxxxxxx
SetDefaultVersion: true
In order to resolve the issue, I simply added the source account id in the TargetAccountIds for the us-east-2 region configuration as well and retried the stack creation.
AWSTemplateFormatVersion: 2010-09-09
Description: Testing Distributor
Parameters:
TargetAccountId:
Type: String
Resources:
Distribution:
Type: 'AWS::ImageBuilder::DistributionConfiguration'
Properties:
Name: Multi Region Distributor
Description: Multi Region Distributor
Distributions:
- Region: us-east-1
AmiDistributionConfiguration:
Name: 'AMI-us-east-1 {{ imagebuilder:buildDate }}'
Description: AMI-us-east-1
TargetAccountIds:
- !Ref AWS::AccountId
LaunchTemplateConfigurations:
- AccountId: !Ref AWS::AccountId
LaunchTemplateId: lt-xxxxxxxxxxxxx
SetDefaultVersion: true
- Region: us-east-2
AmiDistributionConfiguration:
Name: 'AMI-us-east-2 {{ imagebuilder:buildDate }}'
Description: AMI-us-east-2
TargetAccountIds:
- !Ref TargetAccountId
- !Ref AWS::AccountId
LaunchTemplateConfigurations:
- AccountId: !Ref TargetAccountId
LaunchTemplateId: lt-xxxxxxxxxxxxx
SetDefaultVersion: true
With this template, I was able to create the stack successfully. Please refer to the above-mentioned template as an example and if needed any troubleshooting on your stack, you can reach out to us by creating a support case from the Support Center
.
Relevant content
- asked 9 months ago
- asked 2 months ago
- Accepted Answerasked 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago