Skip to content

Commit 0d65483

Browse files
committed
Copy image tags when copying AMI to different region
So that the Name tag is preserved.
1 parent 7cdf968 commit 0d65483

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/resources/user_data/WaitForAmi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ def main():
8989
Name = f"{ami_name}",
9090
Encrypted = True,
9191
SourceImageId = args.ami_id,
92-
SourceRegion = main_region
92+
SourceRegion = main_region,
93+
CopyImageTags = True
9394
)['ImageId']
9495
logger.info(f"Created {remote_ami_ids[region]} in {region}")
9596
for region, remote_ami_id in remote_ami_ids.items():

0 commit comments

Comments
 (0)