LoginSignup
2
0

More than 5 years have passed since last update.

Amazon EC2でAWSが提供するWindows AMIの検索方法 (AWS Tools for Windows PowerShell)

Posted at

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
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0