PowerShell code snippet to get the image used by an specific instance.
$accesskey = 'access-key'
$secretkey = 'secret-key'
$dregion = 'us-east-1'
(Get-EC2Instance -AccessKey $accesskey -SecretKey $secretkey -Region $dregion -InstanceId i-055353ks53sd6n).Instances | select ImageId | ft -HideTableHeaders | out-string
#i-055353ks53sd6n -- replace with the actual instance-id
EC2 Image in AWS is quite important especially if you are deploying a fleet of AWS instances and it has to be in the same image.
Comments
Post a Comment