AWSのAPIでライセンス確認
対象のES2インスタンスにログインして、以下のコマンドを実行する
curl http://169.254.169.254/latest/dynamic/instance-identity/document |grep billingProducts
■ 実行結果
[ec2-user@ip-10-0-1-218 ~]$ curl http://169.254.169.254/latest/dynamic/instance-identity/document |grep billingProducts
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
115 463 115 463 0 0 334k 0 --:--:-- --:--:-- --:--:-- 452k
"billingProducts" : [ "bp-xxxxxxx" ],
「null」でなければライセンスが付与されている
ライセンスが付与されていないインスタンスではyumが実行出来ないなどの問題が発生する