1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
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
.
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 2년 전