AWSからSOAPのサポートが終了する旨のメールが来た時にしたこと

AWSからこんなタイトルのメールがきました。「EC2 SOAP Deprecation affecting account XXXX」

概要

メールの内容を読んでみると、

  • 2014年2月1日以降 すべてのAPIバージョンでSOAP を使って Amazon EC2 にアクセスするのは非推奨になりました。
  • 2015年12月1日から、新規ユーザーはすべてのAPIのバージョンでSOAPを使ってアクセスすると、次の応答を受け取ります。
Client.UnsupportedProtocol: SOAP is no longer supported.
  • 2016年6月30日まで既存ユーザーはAPIの新しいバージョンに移行できるようにするために猶予期間があります。

ということのようです。

既存ユーザーは2016年6月30日までにSOAPを使わないように改修を行う必要があるということのようです。

対象

また、メールにはどのUser Agents、IAM、Regionでいつ最後にアクセスがあったかが書いてありました。

ここのところから、どのへんのスクリプトとかでSOAPを使っているかあたりがつけられるかと思います。

移行方法

原文とともに、ざっくりとした日本語訳です。

Pre-2012 CLI Version

For the EC2 CLI pre-2012, the CLI does not support AWS Query, so the customer would need to upgrade to a new version of the EC2 CLI or the AWS CLI. This involves updating the version of the EC2 CLI and using the Secret and Access key specified in the documentation. You would need to test thoroughly to make sure the functionality remains consistent.

2012年より前のEC2のCLI前は、AWSのクエリをサポートしていないため、EC2 CLIまたはAWS CLIの新しいバージョンにアップグレードする必要があります。これは、EC2のCLIのバージョンを更新し、Secret and Access keyを使用することを含みます。機能が正常に動作しているか確認するために徹底的にテストする必要があります。

EC2 CLI Version between 2012 and 2014

From 2012 to 2014, the EC2 CLI supported both SOAP and AWS Query. The latter is used if you used your Access Key and Secret key for authentication. To use Access and Secret Keys instead of the Private Key and Cert. See http://docs.aws.amazon.com/AWSEC2/latest/APIReference/using-soap-api.html

2012年から2014までの間のEC2 CLIは、SOAPとAWS Queryの両方をサポートしていました。あなたはAccess KeyとSecret keyを使用した場合、後者が使用されます。Private Key and Certの代わりにAccess and Secret Keysを使用します。

  • EC2_PRIVATE_KEY and EC2_CERT はもう使えません。
  • AWS_ACCESS_KEY and AWS_SECRET_KEYを使う必要があります。

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/using-soap-api.html

AWS CLI

Moving to the AWS CLI is a big change. Customers will need to update all the calls, as well as change the way they handle responses. The AWS CLI returns json, the EC2 CLI XML.

AWS CLIに移行するのは大きな変化になります。すべてのコール(jvmベースからpythonベースになって、コマンドが変わる)を更新するだけでなく、レスポンスの処理方法を変更する必要があります。 AWS CLIは、JSON を、EC2 CLI は XML を返します。

以下みたいに変わる感じですね。

ec2-describe-instances
↓
aws ec2 describe-instances

補足

より詳しい情報は以下をご参照ください。

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/making-api-requests.html

http://docs.aws.amazon.com/AWSEC2/latest/APIReference/using-soap-api.html