|
|
@@ -0,0 +1,43 @@
|
|
|
+AWSTemplateFormatVersion: '2010-09-09'
|
|
|
+Description: Image Builder Distribution Configuration Example
|
|
|
+
|
|
|
+Resources:
|
|
|
+ MyDistributionConfiguration:
|
|
|
+ Type: AWS::ImageBuilder::DistributionConfiguration
|
|
|
+ Properties:
|
|
|
+ Name: MyExampleDistributionConfig
|
|
|
+ Description: Distributes the custom AMI to multiple regions and accounts.
|
|
|
+ Distributions:
|
|
|
+ - Region: us-east-1
|
|
|
+ AmiDistributionConfiguration:
|
|
|
+ Name: MyCustomAMI-{{imagebuilder:buildDate}}
|
|
|
+ Description: Custom AMI for us-east-1
|
|
|
+ AmiTags:
|
|
|
+ Project: MyProject
|
|
|
+ Environment: Production
|
|
|
+ LaunchPermission:
|
|
|
+ UserIds:
|
|
|
+ - '123456789012' # An AWS account ID to share the AMI with
|
|
|
+ OrganizationalUnitIds:
|
|
|
+ - 'ou-xxxxxxxxxxxx' # An Organizational Unit ID to share the AMI with
|
|
|
+ - Region: eu-west-1
|
|
|
+ AmiDistributionConfiguration:
|
|
|
+ Name: MyCustomAMI-{{imagebuilder:buildVersion}}
|
|
|
+ Description: Custom AMI for eu-west-1
|
|
|
+ AmiTags:
|
|
|
+ Project: MyProject
|
|
|
+ Environment: Production
|
|
|
+ LaunchPermission:
|
|
|
+ OrganizationalUnitIds:
|
|
|
+ - 'ou-yyyyyyyyyyyy' # Another Organizational Unit ID
|
|
|
+ OrganizationArns:
|
|
|
+ - 'arn:aws:organizations::123456789012:organization/o-xxxxxxxxxx' # An AWS Organization ARN
|
|
|
+ - Region: ap-southeast-2
|
|
|
+ AmiDistributionConfiguration:
|
|
|
+ Name: MyCustomAMI-{{imagebuilder:buildDate}}-AP
|
|
|
+ Description: Custom AMI for ap-southeast-2 with S3 export
|
|
|
+ S3ExportConfiguration:
|
|
|
+ RoleName: MyImageBuilderS3ExportRole # IAM Role for S3 export permissions
|
|
|
+ DiskImageFormat: VHD # or VMDK, RAW
|
|
|
+ S3Bucket: my-imagebuilder-export-bucket
|
|
|
+ S3Prefix: exported-amis/
|