{"id":1613,"date":"2023-03-25T20:37:40","date_gmt":"2023-03-25T12:37:40","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1613"},"modified":"2023-04-27T21:19:30","modified_gmt":"2023-04-27T13:19:30","slug":"aws-ssm-send-command-error-an-error-occurred-invalidinstanceid-when-calling-the-sendcommand-operation","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/aws-ssm-send-command-error-an-error-occurred-invalidinstanceid-when-calling-the-sendcommand-operation\/","title":{"rendered":"aws ssm send-command \u62a5\u9519 An error occurred (InvalidInstanceId) when calling the SendCommand operation"},"content":{"rendered":"<h2>aws ssm<\/h2>\n<p>\u53c2\u8003\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/docs.aws.amazon.com\/zh_cn\/systems-manager\/latest\/userguide\/walkthrough-cli.html\">https:\/\/docs.aws.amazon.com\/zh_cn\/systems-manager\/latest\/userguide\/walkthrough-cli.html<\/a><\/p>\n<ul>\n<li>\u663e\u793a\u5b9e\u4f8b\u662f\u5426\u5904\u4e8e\u8054\u673a\u72b6\u6001<\/li>\n<\/ul>\n<p><!-- more --><\/p>\n<pre><code>aws ssm describe-instance-information --output text --query &quot;InstanceInformationList[*]&quot;<\/code><\/pre>\n<ul>\n<li>\u83b7\u53d6\u5b9e\u4f8b\u7684 IP \u4fe1\u606f<\/li>\n<\/ul>\n<pre><code># aws ssm send-command --instance-ids &quot;xxx&quot; --document-name &quot;AWS-RunShellScript&quot; --comment &quot;IP config&quot; --parameters commands=ifconfig --output text\n\nAn error occurred (InvalidInstanceId) when calling the SendCommand operation<\/code><\/pre>\n<pre><code># systemctl status amazon-ssm-agent<\/code><\/pre>\n<p>\u6b63\u5e38\u65e5\u5fd7\uff1a<code>[HealthCheck] HealthCheck reporting agent health.<\/code><br \/>\n\u5f02\u5e38\u65e5\u5fd7\uff1a<code>ERROR Health ping failed with error - NoCredentialProviders: no valid providers in chain. Deprecated.<\/code><\/p>\n<h2>\u89e3\u51b3<\/h2>\n<p>\u9009\u4e2d\u5b9e\u4f8b -&gt; \u64cd\u4f5c -&gt; \u5b9e\u4f8b\u8bbe\u7f6e -&gt; \u9644\u52a0\/\u66ff\u6362 IAM \u89d2\u8272<\/p>\n<p>IAM \u89d2\u8272\u8981\u6c42\u7684\u6743\u9650\u7b56\u7565<\/p>\n<ul>\n<li><code>AmazonEC2RoleforSSM<\/code><\/li>\n<li><code>AmazonS3FullAccess<\/code><\/li>\n<li><code>AmazonSSMAutomationRole<\/code><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>aws ssm \u53c2\u8003\uff1ahttps:\/\/docs.aws.amazon.com\/zh_cn\/systems-ma [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[90],"tags":[400,401],"class_list":["post-1613","post","type-post","status-publish","format-standard","hentry","category-cloud-devops","tag-aws","tag-ssm"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1613"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1613\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}