Get-EC2ImageByNameは日本語版が検索の対象になっていない。
AMIの名前
AWS提供のWindowsAMIの名前パターン
-
OSバージョン
Windows_Server-2016
,Windows_Server-2012-R2_RTM
, ... -
言語
Japanese
,English
, ... -
Full
,Core
,Nano
-
Base
(SQLServerなし),SQL_2016_Standard
,SQL_2016_Web
, ... - AMIのリリース年月日
検索条件
- region = 検索するリージョン
- owner = "amazon"
- platform = "windows"
- name = 先頭から末尾までのワイルドカード(
?
、*
)、大文字小文字を区別する(CaseSensitive)検索
名前で検索して最新の1件を取得する
Get-EC2Image `
-Region ap-northeast-1 `
-Owner amazon `
-Filter `
@{name="platform"; values="windows"}, `
@{name="name"; values='Windows_Server-2016-Japanese-Full-Base-*'} `
| sort CreationDate -Descending `
| select name, imageid, Description -First 1