{"id":9433,"date":"2023-02-21T21:28:25","date_gmt":"2023-02-21T13:28:25","guid":{"rendered":"http:\/\/123.57.164.21\/?p=9433"},"modified":"2023-02-21T21:28:25","modified_gmt":"2023-02-21T13:28:25","slug":"%e4%b8%80%e6%96%87%e6%90%9e%e6%87%82-aws-iam-%e6%9d%83%e9%99%90-%e5%9f%ba%e7%a1%80%e7%af%87%e4%b8%8a-%e7%90%86%e8%ae%ba","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=9433","title":{"rendered":"\u4e00\u6587\u641e\u61c2 AWS IAM \u6743\u9650 \u57fa\u7840\u7bc7\u4e0a \u7406\u8bba"},"content":{"rendered":"\n<p><strong>\u7b80\u4ecb<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5728\u4e4b\u524d\u7684\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u591a\u6b21\u63d0\u5230\u8d4b\u4e88\u6743\u9650\u65f6\u9700\u8981\u7528 Role\uff0cPolicy\u3002<\/p>\n\n\n\n<p>\u4e8b\u5b9e\u4e0a\u5728\u5229\u7528 AWS \u4efb\u4f55\u8d44\u6e90\u4e4b\u524d\uff0c\u90fd\u9700\u8981\u4e3a\u4f7f\u7528\u8005\u8bbe\u7f6e\u76f8\u5e94\u7684\u6743\u9650\u3002AWS \u901a\u8fc7 IAM \u5bf9\u8d44\u6e90\u8fdb\u884c\u8bbf\u95ee\u63a7\u5236\u548c\u6743\u9650\u8bbe\u7f6e\u3002<\/p>\n\n\n\n<p>\u672c\u6587\u505a\u4e3a IAM \u7684\u4e0a\u7bc7\uff0c\u4e3b\u8981\u4ecb\u7ecd\u672f\u8bed\uff0c\u57fa\u672c\u6982\u5ff5\u53ca\u6743\u9650\u68c0\u8bc1\u6d41\u7a0b\u3002<\/p>\n\n\n\n<p>\u672c\u6587\u7eaf\u7406\u8bba\uff0c\u5b9e\u6218\u68c0\u9a8c\u5b89\u6392\u5728\u4e0b\u4e00\u7bc7\u6587\u7ae0\u4e2d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/02\/image-95-1024x488.png\" alt=\"\" class=\"wp-image-9434\" width=\"592\" height=\"282\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-95-1024x488.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-95-300x143.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-95-768x366.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-95-1536x733.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-95-830x396.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-95-230x110.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-95-350x167.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-95-480x229.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-95.png 1950w\" sizes=\"(max-width: 592px) 100vw, 592px\" \/><\/figure><\/div>\n\n\n\n<p><strong>IAM \u4ecb\u7ecd<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>IAM \u4ecb\u7ecd<\/strong><\/p>\n\n\n\n<p>AWS Identity and Access Management\uff08IAM\uff09\u8d1f\u8d23\u63a7\u5236 AWS \u8d44\u6e90\u7684\u8bbf\u95ee\uff0c\u901a\u8fc7\u63a7\u5236\u767b\u5f55\u7528\u6237\u4ee5\u53ca\u63a7\u5236\u7528\u6237\u7684\u6743\u9650\u6765\u5b9e\u73b0\u5176\u529f\u80fd\u3002<\/p>\n\n\n\n<p>AWS \u7528\u6237\u4e3b\u8981\u5206\u4e24\u5927\u7c7b<\/p>\n\n\n\n<ul><li>AWS account root user\uff1a \u7b2c\u4e00\u6b21\u6ce8\u518c AWS \u670d\u52a1\u65f6\u521b\u5efa\u7684\u7528\u6237\uff0c\u5177\u6709\u5bf9 AWS \u6240\u6709\u8d44\u6e90\u7684\u8bbf\u95ee\u6743\u9650\u3002\u6b64\u7528\u6237\u4e00\u822c\u4e0d\u505a\u4e3a\u5e73\u65f6\u7684\u5de5\u4f5c\u7528\u6237\uff0c\u800c\u53ea\u7528\u6765\u7ba1\u7406\u90e8\u5206\u5e10\u53f7\u76f8\u5173\u7684\u5de5\u4f5c\uff0c\u6bd4\u5982 Billing<\/li><li>AWS IAM user\uff1a \u7531 root user \u521b\u5efa\u7684\u7528\u6237\uff0c\u7528\u6765\u505a\u5e73\u65f6\u5177\u4f53\u5de5\u4f5c\uff0c\u9700\u8981\u8d4b\u4e88\u9700\u8981\u7684\u6743\u9650\u3002\u505a\u4e3a AWS \u7ba1\u7406\u5458\uff0c\u4e00\u822c\u4e5f\u4e0d\u4f1a\u7528 root \u7528\u6237\uff0c\u800c\u662f\u7528 IAM user \u8fdb\u884c\u65e5\u5e38\u5de5\u4f5c\u3002<\/li><\/ul>\n\n\n\n<p><strong>1. \u4e3b\u8981\u5143\u7d20<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/02\/image-96-1024x867.png\" alt=\"\" class=\"wp-image-9435\" width=\"561\" height=\"475\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-96-1024x867.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-96-300x254.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-96-768x650.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-96-1536x1301.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-96-830x703.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-96-230x195.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-96-350x296.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-96-480x407.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-96.png 1646w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/figure><\/div>\n\n\n\n<p>\u4e0b\u9762\u7684\u5143\u7d20\u662f\u5728 IAM \u7684\u8bed\u5883\u4e0b<\/p>\n\n\n\n<ul><li>Resources\uff1a \u5728\u8fd9\u91cc\u6307\u7684\u662f IAM \u4e2d\u7684\u5bf9\u8c61\uff0c\u6bd4\u5982 user\uff0cgroup\uff0cRole\uff0cPolicy \u7b49\uff0c\u5e76\u4e0d\u662f AWS EC2\/Lambda \u8fd9\u79cd AWS \u8d44\u6e90<\/li><li>Identities\uff1a \u53ef\u4ee5\u628a policy \u8d4b\u7ed9\u7684\u5bf9\u50cf\uff0c\u5177\u4f53\u6307 user\uff0cgroup\uff0cRole<\/li><li>Entities\uff1a \u6307\u7528\u6765\u9a8c\u6743\u7684\u5bf9\u50cf\uff0c\u5177\u4f53\u6307 user\uff0cfederated user\uff08\u8054\u5408\u7528\u6237\uff09\u548c assumed IAM roles<\/li><li>Principals\uff1a \u662f\u6307\u5229\u7528 root \u7528\u6237\u6216 IAM user\/role \u8fdb\u884c\u767b\u5f55\u5e76\u8bf7\u6c42\uff08Request\uff09\u4f7f\u7528 AWS \u670d\u52a1\u7684\u4e2a\u4eba\u6216\u8005\u5e94\u7528<\/li><\/ul>\n\n\n\n<p>\u4e0a\u9762\u540e\u4e09\u4e2a\u6982\u5ff5\u5f88\u76f8\u4f3c\uff0c\u6211\u4eec\u4e3e\u4e2a\u5177\u4f53\u7684\u4f8b\u5b50<\/p>\n\n\n\n<p>AWS \u7ba1\u7406\u5458\u5c0f\u738b\uff08Principal\uff09\u7528\u4ed6\u7684 IAM user \u5e10\u53f7\u201cxiaowang001\u201d\uff08Entity\uff09\u767b\u5f55 AWS \u63a7\u5236\u53f0\u3002<\/p>\n\n\n\n<p>\u5c0f\u738b\u7684\u5e10\u53f7\u201cxiaowang001\u201d\u5c5e\u4e8e administrator \u7ec4\uff08Identity\uff09\uff0cadministrator \u7ec4\u88ab\u8d4b\u4e88\u4e86\u201cAdministratorAccess\u201d\u7684 policy\u3002<\/p>\n\n\n\n<p>\u5c0f\u738b\u7684\u5e10\u53f7\u201cxiaowang001\u201d\u5373\u662f Entity \u4e5f\u662f Identity\uff0c\u56e0\u4e3a\u201cxiaowang001\u201d\u5373\u662f\u88ab\u9a8c\u6743\u7684\u5bf9\u8c61\uff0c\u4e5f\u53ef\u4ee5\u88ab\u76f4\u63a5\u8d4b\u4e88 policy\u3002<\/p>\n\n\n\n<p><strong>2. account\u3001user\u3001group\u3001role<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>account<\/strong><\/p>\n\n\n\n<p>AWS account \u662f\u4f60\u62e5\u6709\u6240\u6709 AWS \u8d44\u6e90\u7684\u4e00\u4e2a\u5bb9\u5668\u3002<\/p>\n\n\n\n<p>\u5728\u6ce8\u518c AWS \u5e10\u53f7\u65f6\u521b\u5efa\u4e86 AWS account\uff0c\u4e4b\u540e\u6240\u6709\u7684\u64cd\u4f5c\u5747\u5728\u6b64 account \u4e2d\u8fdb\u884c\uff0c\u5bf9 AWS account \u7ba1\u7406\u7684\u6839\u7528\u6237\u5c31\u662f AWS account root user\u3002<\/p>\n\n\n\n<p>AWS \u63a7\u5236\u53f0\uff0c\u53f3\u4e0a\u89d2\u53ef\u4ee5\u770b\u5230\u5f53\u524d\u767b\u5f55\u7684 IAM user \u548c account \u4fe1\u606f<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/02\/image-97-721x1024.png\" alt=\"\" class=\"wp-image-9436\" width=\"341\" height=\"484\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-97-721x1024.png 721w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-97-211x300.png 211w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-97-230x326.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-97-350x497.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-97-480x681.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-97.png 768w\" sizes=\"(max-width: 341px) 100vw, 341px\" \/><\/figure><\/div>\n\n\n\n<p><strong>user<\/strong><\/p>\n\n\n\n<p>\u4e0a\u9762\u63d0\u5230\u4e86\u7528\u6237\u5206\u6210 AWS account root user \u548c IMA user \u4e24\u5927\u7c7b\uff0c\u4e0b\u9762\u4e3b\u8981\u7528\u5230\u7684\u662f IMA user\u3002<\/p>\n\n\n\n<p>IAM user \u662f\u4e00\u4e2a entity\uff0c\u5177\u6709\u4e00\u4e2a\u552f\u4e00\u7684 Amazon Resource Name (ARN)\uff0c\u5728\u4e0b\u6587 policy \u7684 Principal \u4e2d\u6307\u5b9a\u7684\u5c31\u662f IAM user \u7684 ARN\u3002<\/p>\n\n\n\n<p>IAM user \u65e2\u53ef\u4ee5\u662f\u4e00\u4e2a\u5177\u4f53\u4eba\u7684\u5e10\u53f7\uff0c\u4e5f\u53ef\u80fd\u662f application \u7528\u6237\uff08\u7528\u5728 AWS API \u4e2d\u7684\u7528\u6237\uff09\u3002<\/p>\n\n\n\n<p>IAM user \u6709\u4e24\u79cd\u9a8c\u8bc1\u65b9\u5f0f\u6765\u8bbf\u95ee AWS<\/p>\n\n\n\n<ul><li>Console password \u4ea4\u4e92\u5f0f\u767b\u5f55 AWS \u754c\u9762\u65f6\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801<\/li><li>Access keys \u5728\u7528\u6237\u4e0b\u53ef\u4ee5\u521b\u5efa Access key \u540c\u65f6\u81ea\u52a8\u751f\u6210 secret\uff0cAcess Key \u7528\u4e8e AWS Cli \u548c AWS API \u7684\u573a\u5408<\/li><\/ul>\n\n\n\n<p>\u65b0\u5efa IAM user \u662f\u6ca1\u6709\u6743\u9650\u4f7f\u7528 AWS \u8d44\u6e90\u7684\uff0c\u8fd9\u65f6\u9700\u8981\u901a\u8fc7\u4e0b\u9762\u4ecb\u7ecd\u7684 policy \u628a\u4f7f\u7528 AWS \u8d44\u6e90\u7684\u6743\u9650\u8d4b\u7ed9 IAM user \u6216\u76f8\u5e94\u7684 group\u3002<\/p>\n\n\n\n<p><strong>group<\/strong><\/p>\n\n\n\n<p>group \u662f IAM user \u7684\u96c6\u5408\uff0c\u4e3b\u8981\u529f\u80fd\u662f\u96c6\u4e2d\u7ba1\u7406\u7528\u6237\u6743\u9650\uff0c\u901a\u8fc7\u628a policy \u8d4b\u7ed9 group \u7684\u65b9\u5f0f\uff0c\u628a\u6743\u9650\u8d4b\u4e88 group \u4e2d\u7684\u7528\u6237\u3002<\/p>\n\n\n\n<p><em>\u63d0\u793a\uff1a\u4e0b\u6587\u4ecb\u7ecd\u7684 resource-based policy \u4e2d Principal \u53ea\u80fd\u6307\u5b9a\u4e3a IAM user \u4e0d\u80fd\u6307\u5b9a\u4e3a group<\/em><\/p>\n\n\n\n<p>group \u6709\u5982\u4e0b\u4e00\u4e9b\u7279\u70b9<\/p>\n\n\n\n<ul><li>\u4e00\u4e2a group \u53ef\u4ee5\u5305\u542b\u591a\u4e2a user\uff0c\u4e00\u4e2a user \u4e5f\u53ef\u4ee5\u5c5e\u4e8e\u591a\u4e2a group<\/li><li>group \u4e2d\u53ea\u80fd\u5305\u542b user\uff0c\u4e0d\u80fd\u5305\u542b group<\/li><li>\u6ca1\u6709 default group \u5305\u542b\u6240\u6709\u7528\u6237<\/li><\/ul>\n\n\n\n<p><strong>role<\/strong><\/p>\n\n\n\n<p>IAM role \u662f\u4e00\u4e2a IAM identity\uff0c\u4e0e user \u76f8\u4f3c\uff0c\u4e5f\u53ef\u4ee5\u88ab\u8d4b\u4e88 policy\uff0c\u4f46\u662f\u6ca1\u6709 password\u3002<\/p>\n\n\n\n<p>role \u53ef\u4ee5\u88ab\u9700\u8981\u7684\u7528\u6237\u3001\u5e94\u7528\u6216\u8005 AWS \u670d\u52a1\u4ee3\u5165\uff08assume\uff09\uff0c\u901a\u8fc7\u4ee3\u5165\uff08assume\uff09\u7684\u65b9\u5f0f\u95f4\u63a5\u63d0\u4f9b\u6743\u9650\u3002<\/p>\n\n\n\n<p>\u6bd4\u5982\uff0c\u6211\u4eec\u5728\u524d\u51e0\u7bc7\u5173\u4e8e CICD \u7684\u6587\u7ae0\u4e2d\u7ed9 Lambda \u51fd\u6570\u5efa\u4e86 role\uff0crole \u4e2d\u52a0\u5165\u4e86\u8c03\u7528 Codedeploy \u7684 policy\u3002Lambda \u51fd\u6570\u901a\u8fc7\u4ee3\u5165\uff08assume\uff09\u8fd9\u4e2a role \u5f97\u5230\u4e86\u4f7f\u7528 Codeploy \u8d44\u6e90\u7684\u6743\u9650\u3002<\/p>\n\n\n\n<p>role \u53ef\u4ee5\u88ab\u4ee5\u4e0b\u7528\u6237\u3001\u8d44\u6e90\u4f7f\u7528\uff08assume\uff09<\/p>\n\n\n\n<ul><li>\u548c role \u5904\u5728\u540c\u4e00\u4e2a account \u7684 IAM user<\/li><li>\u548c role \u5904\u5728\u4e0d\u540c account \u7684 IAM user<\/li><li>AWS \u8d44\u6e90\uff0c\u6bd4\u5982 Lambda\uff0cEC2<\/li><li>\u7531\u5916\u90e8 IdP(SAML 2.0 or OpenID Connect)\u6388\u6743\u7684\u5916\u90e8\u7528\u6237<\/li><\/ul>\n\n\n\n<p>\u4e0b\u9762\u4ecb\u7ecd\u4e00\u4e9b\u548c role \u76f8\u5173\u7684\u672f\u8bed<\/p>\n\n\n\n<ul><li>AWS service role\uff1a AWS \u670d\u52a1\u4ee3\u5165\uff08assume\uff09\u7684 role\uff0c\u4e3a AWS \u670d\u52a1\u63d0\u4f9b\u5fc5\u8981\u6743\u9650\u3002\u6bd4\u5982\u4e0a\u6587\u4e2d\u7ed9 Lambda \u521b\u5efa\u7684 role<\/li><li>AWS service role for an EC2 instance\uff1a \u4e00\u79cd\u7279\u6b8a\u7684 role\uff0c\u8d4b\u7ed9 EC2\uff08\u53c8\u79f0\u4e3a EC2 Profile\uff09\uff0c\u4f7f\u8fd0\u884c\u5728 EC2 \u4e0a\u7684 application \u53ef\u4ee5\u4ece\u6b64 role \u4e2d\u83b7\u5f97\u64cd\u4f5c AWS \u8d44\u6e90\u7684\u6743\u9650<\/li><li>AWS service-linked role\uff1a \u8fd9\u79cd role \u4e0e AWS \u670d\u52a1\u76f4\u63a5\u76f8\u5173\uff0c\u7531 AWS \u670d\u52a1\u9884\u5148\u5b9a\u4e49\u597d\uff0c\u53ef\u7531 AWS \u670d\u52a1\u81ea\u52a8\u521b\u5efa\uff0c\u6709\u4e9b\u53ef\u4ee5\u4eba\u4e3a\u4fee\u6539\uff0c\u6709\u4e9b\u5219\u4e0d\u884c\uff0c\u7531\u5177\u4f53 AWS \u670d\u52a1\u51b3\u5b9a<\/li><li>Delegation\uff1a \u5141\u8bb8\u5176\u4ed6\u7528\u6237\u8bbf\u95ee\u4f60\u7684 AWS \u8d44\u6e90\u3002Delegation \u6d89\u53ca\u5230\u4e24\u4e2a account\uff0c\u62e5\u6709 AWS \u8d44\u6e90\u7684 trusting account \u548c\u60f3\u8bbf\u95ee AWS \u8d44\u6e90\u7684\u7528\u6237\u6240\u5728\u7684 trusted account<\/li><\/ul>\n\n\n\n<p><strong>\u5728 trusting account \u4e2d\uff08\u62e5\u6709 AWS \u8d44\u6e90\uff09<\/strong><\/p>\n\n\n\n<p>\u521b\u5efa role\uff0c\u7ed1\u5b9a policy \u5141\u8bb8\u8bbf\u95ee AWS \u8d44\u6e90\uff0c\u8bbe\u7f6e trust relationship \u5141\u8bb8 trusted account \u4e2d\u7684 user \u4ee3\u5165\uff08assume\uff09role<\/p>\n\n\n\n<p><strong>\u5728 trusted account \u4e2d\uff08\u60f3\u8bbf\u95ee AWS \u8d44\u6e90\uff09<\/strong><\/p>\n\n\n\n<p>\u9700\u8981\u7ed9\u7528\u6237\u7ed1\u5b9a\u4e00\u4e2a policy \u5141\u8bb8\u7528\u6237\u505a switch \u6216 assume role\u3002<\/p>\n\n\n\n<p><em>\u63d0\u793a\uff1a\u5f53\u7528\u6237\u4ee3\u5165 role \u540e\uff0c\u539f\u7528\u6237\u7684\u6743\u9650\u6682\u65f6\u53d6\u6d88\uff0c\u7531 role \u4e2d\u7684\u6743\u9650\u4ee3\u66ff\u3002\u5f53\u7528\u6237\u9000\u51fa role \u540e\uff0c\u539f\u7528\u6237\u6743\u9650\u6062\u590d<\/em><\/p>\n\n\n\n<ol><li>Federation\uff1a \u5728 AWS \u548c\u5916\u90e8 IdP\uff08identity provider\uff09\u95f4\u5efa\u7acb\u4fe1\u4efb\u5173\u7cfb\u540e\uff0c\u7528\u6237\u5728\u5916\u90e8 IdP \u9a8c\u8bc1\u540e\uff0cAWS \u8d4b\u4e88\u7528\u6237 IAM role \u5b9e\u73b0\u64cd\u4f5c AWS \u8d44\u6e90\uff0c\u652f\u6301 OpenID Connect\uff08OIDC\uff09\u548c SAML 2.0<br><\/li><li>Federated user\uff1a Federation \u4e2d\u7684\u7528\u6237\uff0c\u901a\u8fc7\u5916\u90e8 IdP \u9a8c\u8bc1\u540e\u8bbf\u95ee AWS \u8d44\u6e90<\/li><\/ol>\n\n\n\n<p><strong>3. Request<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5f53 Principal \u5229\u7528 AWS \u63a7\u5236\u53f0\u754c\u9762\uff0cAWS API \u6216\u8005 AWS Cli \u5bf9 AWS \u670d\u52a1\u8fdb\u884c\u8bbf\u95ee\/\u8c03\u7528\u65f6\uff0cPrincipal \u53d1\u9001\u7ed9 AWS \u7684\u4fe1\u606f\u79f0\u4e3a Request\u3002<\/p>\n\n\n\n<p>Request \u5305\u62ec\u4ee5\u4e0b\u4fe1\u606f<\/p>\n\n\n\n<ul><li>Actions or operations\uff1a\u5bf9 AWS \u670d\u52a1\u7684\u5177\u4f53\u64cd\u4f5c\uff0c\u6bd4\u5982\u505c\u6b62 EC2<\/li><li>Resources\uff1a \u8fd9\u91cc\u662f\u6307 AWS \u7684\u8d44\u6e90\uff0c\u6bd4\u5982 EC2\uff0cS3\uff0c\u4e0d\u662f\u4e0a\u9762\u8bf4\u7684 Resources\uff08IAM \u4e2d\u7684\u5bf9\u8c61\uff09<\/li><li>Principal\uff1a \u4e0e\u4e0a\u9762\u5b9a\u4e49\u7684 Principal \u76f8\u540c\uff0c\u662f\u6307\u5229\u7528 root \u7528\u6237\u6216 IAM user\/role \u8fdb\u884c\u767b\u5f55\u5e76\u8bf7\u6c42\uff08Request\uff09\u4f7f\u7528 AWS \u670d\u52a1\u7684\u4e2a\u4eba\u6216\u8005\u5e94\u7528<\/li><li>Environment data\uff1a \u5305\u62ec Principal \u6240\u5728\u7684 ip\uff0c\u7528\u6237\u4ee3\u7406\uff0c\u662f\u5426 SSL \u53ca\u53d1\u9001 request \u7684\u65f6\u95f4\u7b49<\/li><li>Resource data\uff1a\u548c\u60f3\u64cd\u4f5c\u7684 AWS \u8d44\u6e90\u76f8\u5173\u7684\u4fe1\u606f\uff0c\u6bd4\u5982\u8981\u505c\u7684 EC2 \u7684 instaince id \u6216\u8005 tag<\/li><\/ul>\n\n\n\n<p>AWS \u6536\u5230 Request \u540e\uff0c\u4f1a\u628a\u8fd9\u4e9b\u4fe1\u606f\u6536\u96c6\u8d77\u6765\u7ec4\u6210 Request context\uff0c\u7528\u6765\u8bc4\u4f30\u548c\u6388\u6743 Request\u3002<\/p>\n\n\n\n<p><strong>4. \u9274\u6743\uff08Authentication\uff09<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Authentication \u9274\u6743\uff0c\u662f\u68c0\u67e5\u4f60\u662f\u5426\u6709\u6743\u5229\u53d1\u9001 Reqeust\u3002<\/p>\n\n\n\n<p>\u6bd4\u5982\uff0c\u7528\u6237\u767b\u5f55 AWS \u754c\u9762\uff0c\u8f93\u5165 IAM \u7528\u6237\u548c\u5bc6\u7801\u540e\u767b\u5f55\u6210\u529f\uff0c\u5c31\u662f Authentication\uff0c\u8bf4\u660e\u8fd9\u4e2a IAM \u7528\u6237\u6709\u6743\u767b\u5f55 AWS \u754c\u9762\uff08\u53ef\u4ee5\u53d1\u9001 Request\uff09\u3002<\/p>\n\n\n\n<p>\u5f53\u4f7f\u7528 AWS CLi \u524d\uff0c\u6211\u4eec\u8981\u5148\u5728 profile \u4e2d\u914d\u7f6e access key \u548c secret key\uff0c\u7136\u540e\u624d\u80fd\u4f7f\u7528 AWS CLi \u64cd\u4f5c AWS\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7 AWS CLi \u64cd\u4f5c AWS \u65f6\uff0cAWS \u5148\u9a8c\u8bc1 access key \u548c secret key \u7684\u6b63\u786e\u6027\uff08Authentication\uff09\uff0c\u7136\u540e\u624d\u4f1a\u5bf9 Request \u4f5c\u51fa\u54cd\u5e94\uff08\u6709\u6743\u6216\u8005\u65e0\u6743\uff09\u3002<\/p>\n\n\n\n<p><strong>5. \u6388\u6743\uff08Authorizaion\uff09<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Authorizaion \u6388\u6743\uff0c\u662f\u68c0\u67e5\u4f60\u7684 Request \u88ab\u5141\u8bb8\u8fd8\u662f\u62d2\u7edd\uff0c\u5373\u5bf9 AWS \u670d\u52a1\u4f7f\u7528\u7684\u6743\u9650\u3002<\/p>\n\n\n\n<p>\u6bd4\u5982\u4f60\u7528 IAM \u7528\u6237\u6210\u529f\u767b\u5f55\u4e86 AWS \u754c\u9762\uff08Authentication \u6210\u529f\uff09\uff0c\u73b0\u5728\u4f60\u60f3\u505c\u6389\u4e00\u4e2a EC2\uff0cAWS \u4f1a\u8bc4\u4f30\u4f60\u7684\u7528\u6237\u662f\u5426\u6709\u505c\u6389\u8fd9\u4e2a EC2 \u7684\u6743\u9650\uff0c\u53ea\u6709\u88ab\u6388\u6743\u4e86\uff0c\u624d\u80fd\u5b8c\u6210\u8fd9\u4e2a\u52a8\u4f5c\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u5217\u51fa\u8bc4\u4f30\u4e00\u4e2a Request \u662f\u5426\u6709\u6743\u9650\u6267\u884c\u7684\u51e0\u4e2a\u4e3b\u8981\u539f\u5219<\/p>\n\n\n\n<ul><li>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6240\u6709 Request \u90fd\u88ab\u62d2\u7edd\uff0c\u9664\u4e86\u7528 Root \u7528\u6237\u53d1\u51fa\u7684 Request\u3002\u6240\u6709\u65b0\u5efa\u7684 IAM user\uff0c\u5982\u679c\u6ca1\u6709\u663e\u5f0f\u7684\u8d4b\u4e88\u6743\u9650\uff08policy\uff09\uff0c\u5219\u6b64\u7528\u6237\u9664\u4e86\u767b\u5f55\uff08\u5728\u521b\u5efa\u65f6\u9009\u62e9\u4e86 console \u767b\u5f55\uff09\uff0c\u4ec0\u4e48\u64cd\u4f5c\u4e5f\u4e0d\u80fd\u505a<\/li><li>\u53ea\u6709\u7528\u6237\u88ab\u663e\u793a\u6388\u6743\uff0c\u624d\u80fd\u8fdb\u884c\u76f8\u5e94\u7684\u64cd\u4f5c<\/li><li>\u5982\u679c\u5b58\u5728 Organizations SCP, IAM permissions boundary, \u6216\u8005 a session policy \u7684\u8bdd\uff0c\u8fd9\u51e0\u9879\u5fc5\u987b\u5168\u90e8\u663e\u5f0f\u8d4b\u6743\uff0c\u53ef\u4ee5\u8fdb\u884c\u76f8\u5e94\u7684\u64cd\u4f5c<\/li><li>\u5982\u679c\u591a\u4e2a policy \u5b58\u5728\uff0c\u53ea\u8981\u5176\u4e2d\u4e00\u4e2a policy \u4e2d\u542b\u6709\u62d2\u7edd\u67d0\u9879\u64cd\u4f5c\uff0c\u5219\u65e0\u8bba\u5176\u5b83 policy \u4e2d\u662f\u5426\u5b58\u5728\u663e\u5f0f\u8d4b\u6743\uff0c\u8fd9\u9879\u64cd\u4f5c\u90fd\u8ba4\u4e3a\u662f\u6ca1\u6709\u6743\u9650<\/li><\/ul>\n\n\n\n<p><strong>6. Policy \u548c permission\uff08\u6743\u9650\uff09<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>AWS \u4e2d permission\uff08\u6743\u9650\uff09\u901a\u8fc7 policy \u8d4b\u4e88\u7528\u6237\u3001\u7ec4\u3001Role \u6216\u8005 AWS \u8d44\u6e90\u5b9e\u73b0\u3002policy \u662f permission \u7684\u96c6\u5408\uff0c\u901a\u5e38\u4ee5 Json \u6587\u4ef6\u5f62\u5f0f\u663e\u793a\u3002<\/p>\n\n\n\n<p>AWS \u4e2d\u652f\u6301 6 \u79cd policy<\/p>\n\n\n\n<ul><li>identity-based policies\uff1a \u8d4b\u4e88\u7ed9\u7528\u6237\u3001\u7ec4\u6216\u8005 role \u7684 policy\uff0c\u6307\u5b9a\u5176\u5bf9 AWS \u8d44\u6e90\u7684\u4f7f\u7528\u6743\u9650<\/li><li>resource-based policies\uff1a \u8d4b\u4e88\u7ed9 AWS \u8d44\u6e90\u7684 policy\uff0c\u6bd4\u5982\u8d4b\u7ed9 S3 \u7684\uff0c\u7528\u6765\u6307\u5b9a\u54ea\u4e9b\u7528\u6237\u53ef\u4ee5\u8bbf\u95ee\u67d0\u4e2a bucket \u7684 policy<\/li><li>permissions boundaries\uff1a \u8d4b\u7ed9\u7528\u6237\u6216\u8005 role \u7684 policy\uff0c\u7528\u6765\u6307\u5b9a\u5176\u6700\u5927\u6743\u9650\uff0c\u4f46 permissions boundaries \u672c\u8eab\u5e76\u6ca1\u6709\u63d0\u4f9b\u5141\u8bb8\u7684\u6743\u9650\u3002\u5b83\u53ea\u662f\u9650\u5236\u53ef\u7528\u7684 identity-based \u6743\u9650\u7684\u6700\u5927\u503c\u3002<\/li><\/ul>\n\n\n\n<p><em>\u6ce8\u610f\uff1apermissions boundaries \u5bf9\u4e8e resource-based policy \u4e2d\u7ed9\u7528\u6237\u6216 role \u63d0\u4f9b\u7684\u6743\u9650\u4e0d\u505a\u9650\u5236<\/em><\/p>\n\n\n\n<p>\u4f8b\u5b50\uff1a<\/p>\n\n\n\n<ol><li>\u7528\u6237\u7684 identity-based policy \u5141\u8bb8\u5bf9 S3 \u8fdb\u884c\u5168\u90e8\u64cd\u4f5c\uff0cpermissions boundaries \u7684 policy \u4e2d\u53ea\u5141\u8bb8\u7528\u6237 list Bucket\uff0c\u5219\u7528\u6237\u53ea\u80fd\u8fdb\u884c list bucket \u64cd\u4f5c<br><\/li><li>\u7528\u6237\u7684 identity-based policy \u5141\u8bb8\u5bf9 S3 \u8fdb\u884c list Bucket \u64cd\u4f5c\uff0cpermissions boundaries \u7684 policy \u4e2d\u5141\u8bb8\u7528\u6237\u5bf9 S3 \u8fdb\u884c\u5168\u90e8\u64cd\u4f5c\uff0c\u5219\u7528\u6237\u53ea\u80fd\u8fdb\u884c list Bucket \u64cd\u4f5c<br><\/li><\/ol>\n\n\n\n<ul><li>Organizations SCPs\uff1a AWS Organizations service control policy (SCP) \u53ef\u4ee5\u4e3a\u4e00\u4e2a\u7ec4\u7ec7\u7684\u5168\u90e8\u5e10\u53f7\u6216\u8005 OU\uff08organizational unit\uff09\u8bbe\u5b9a\u53ef\u7528\u7684\u6700\u5927\u6743\u9650\uff0c\u4e0e permissions boundaries \u76f8\u4f3c<\/li><li>Access control lists\uff1a \uff08ACLs\uff09\u63a7\u5236\u5176\u5b83\u5e10\u53f7\uff08AWS account\uff09\u4e2d\u7684\u7528\u6237\u8bbf\u95ee\u672c\u5e10\u53f7\u8d44\u6e90\u7684 policy\uff0c\u8fd9\u79cd policy \u53ea\u5bf9\u5176\u5b83 account \u4e2d\u7684\u7528\u6237\u6709\u6548\uff0c\u5bf9\u81ea\u5df1 account \u4e2d\u7528\u6237\u65e0\u6548<\/li><li>session policies\uff1a \u9ad8\u7ea7 policy\uff0c\u5f53\u7528 AWS Cli \u6216\u8005 AWS API \u65f6\u9700\u8981\u7528\u5230 assume role \u6216\u8005 federated user\u3002session policies \u9650\u5236\u4e86 role \u6216\u8005\u7528\u6237\u4f20\u9012\u7ed9 session \u7684\u6743\u9650\uff0c\u4e0e permissions boundaries \u76f8\u4f3c\uff0c\u8d77\u7684\u662f\u9650\u5236\u4f5c\u7528<\/li><\/ul>\n\n\n\n<p><strong>7. policy \u8bc4\u4f30\u903b\u8f91<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5f53 principal \u5229\u7528 AWS \u63a7\u5236\u53f0\u3001AWS CLi \u6216\u8005 AWS API \u8fdb\u884c\u64cd\u4f5c\u65f6\uff0cprincipal \u53d1\u9001 request \u5230 AWS\u3002<\/p>\n\n\n\n<p>AWS \u63a5\u5230 request \u5e76\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff0c\u51b3\u5b9a\u662f\u5426\u6267\u884c request<\/p>\n\n\n\n<ol><li>Authentication<\/li><li>Processing the request context<\/li><li>Evaluating policies within a single account<\/li><li>Determining whether a request is allowed or denied within an account<\/li><\/ol>\n\n\n\n<p>\u6211\u4eec\u91cd\u70b9\u4ecb\u7ecd\u540e\u4e24\u6b65\uff0c\u5f53\u5b58\u5728\u591a\u79cd policy \u65f6\uff0c\u5982\u4f55\u51b3\u5b9a\u6700\u7ec8\u6743\u9650\uff1f<\/p>\n\n\n\n<p><strong>\u8bc4\u4f30 identity-based policies \u548c resource-based policies<\/strong><\/p>\n\n\n\n<p>identity-based policies \u8d4b\u4e88 user\u3001group \u6216 role\uff0c\u6307\u5b9a\u5b83\u4eec\u662f\u5426\u6709\u64cd\u4f5c AWS \u8d44\u6e90\u7684\u6743\u9650\u3002<\/p>\n\n\n\n<p>resource-based policies \u8d4b\u4e88 AWS \u8d44\u6e90\uff0c\u6307\u5b9a user\u3001group \u6216 role \u53ef\u4ee5\u5bf9\u81ea\u8eab\u7684 AWS \u8d44\u6e90\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u5f53\u5b58\u5728\u4e24\u79cd policy \u65f6\uff0c\u603b\u7684\u5141\u8bb8\u6743\u9650\u662f\u4e24\u79cd policy \u7684\u4e2d\u5141\u8bb8\u6743\u9650\u7684\u548c\uff0c\u5373\u53ea\u8981\u5176\u4e2d\u4e00\u79cd policy \u5141\u8bb8\u4e00\u4e2a\u64cd\u4f5c\uff0c\u90a3\u4e48\u603b\u7684\u6743\u9650\u5c31\u662f\u5141\u8bb8\u8fd9\u4e2a\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u62d2\u7edd\u6743\u9650\uff0c\u53ea\u8981\u4e00\u79cd policy \u4e2d\u5b58\u5728\u62d2\u7edd\u6743\u9650\uff0c\u5219\u5373\u4f7f\u53e6\u4e00\u79cd policy \u4e2d\u5b58\u5728\u5141\u8bb8\u6743\u9650\uff0c\u603b\u7684\u6743\u9650\u4e5f\u662f\u62d2\u7edd\u3002\uff08\u62d2\u7edd\u6743\u9650\u9ad8\u4e8e\u5141\u8bb8\u6743\u9650\uff09<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/02\/image-98-1024x966.png\" alt=\"\" class=\"wp-image-9437\" width=\"416\" height=\"393\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-98-1024x966.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-98-300x283.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-98-768x725.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-98-830x783.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-98-230x217.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-98-350x330.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-98-480x453.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-98.png 1102w\" sizes=\"(max-width: 416px) 100vw, 416px\" \/><\/figure><\/div>\n\n\n\n<p>\u4e3e\u4e2a\u4f8b\u5b50<\/p>\n\n\n\n<p>AWS \u7ba1\u7406\u5458\u5c0f\u738b\uff08Principal\uff09\u7684\u5e10\u53f7\u201cxiaowang001\u201d\uff08Entity\uff09\u4e2d\u5b58\u5728\u4e00\u4e2a policy\uff08identity-based policies\uff09\uff0c\u8fd9\u4e2a policy \u53ea\u5141\u8bb8\u5c0f\u738b Put\uff08\u4e0a\u4f20\uff09S3 \u201cbucket1\u201d\u3002\uff08\u8fd9\u91cc\u7b80\u5316\u8d77\u89c1\uff0c\u5148\u4e0d\u8003\u8651\u8fd8\u8981 list bucket \u7684\u6743\u9650\uff09<\/p>\n\n\n\n<p>S3 \u201cbucket1\u201d\u7684 policy\uff08resource-based policies\uff09\u53ea\u5141\u8bb8\u5c0f\u738b\u5bf9\u201cbucket1\u201d\u4e2d\u5bf9\u50cf\u8fdb\u884c delete \u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u8fd9\u65f6\u5c0f\u738b\u8bbf\u95ee S3 \u65f6\uff0c\u5728\u4e24\u79cd policy \u7684\u4f5c\u7528\u4e0b\uff0c\u5c0f\u738b\u65e2\u53ef\u4ee5\u4e0a\u4f20\u4e5f\u53ef\u4ee5\u5220\u9664 S3 \u201cbucket1\u201d\u4e2d\u7684\u5bf9\u8c61\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u5c0f\u738b\u7684\u7528\u6237\u7684 policy \u5141\u8bb8\u5bf9 S3 \u201cbucket1\u201d\u505a Put\uff08\u4e0a\u4f20\uff09\uff0c\u4f46 S3 \u201cbucket1\u201d\u7684 policy \u4e2d\u7981\u6b62\u5c0f\u738b\u7684\u7528\u6237 Put\uff08\u4e0a\u4f20\uff09\uff0c\u5219\u5c0f\u738b\u6ca1\u6709\u4e0a\u4f20\u8fd9\u4e2a S3 Bucket \u7684\u6743\u9650\u3002<\/p>\n\n\n\n<p><strong>\u8bc4\u4f30 identity-based policies \u548c permissions boundaries<\/strong><\/p>\n\n\n\n<p>permissions boundaries \u7684\u4f5c\u7528\u662f\u9650\u5236\u6743\u9650\uff0c\u4e24\u79cd policy \u5728\u4e00\u8d77\u7684\u603b\u6743\u9650\u662f\u4e24\u79cd policy \u6743\u9650\u7684\u4ea4\u96c6\u3002<\/p>\n\n\n\n<p>identity-based policies \u4e2d\u5b9a\u4e49\u7684\u6743\u9650\uff0c\u5982\u679c\u8d85\u51fa\u4e86 permissions boundaries \u5b9a\u4e49\u7684\u6743\u9650\uff0c\u5219\u8d85\u51fa\u7684\u90e8\u5206\u4e0d\u8d77\u4f5c\u7528\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/02\/image-99-1024x1007.png\" alt=\"\" class=\"wp-image-9438\" width=\"460\" height=\"452\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-99-1024x1007.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-99-300x295.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-99-768x755.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-99-830x816.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-99-230x226.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-99-350x344.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-99-480x472.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-99.png 1060w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/figure><\/div>\n\n\n\n<p><strong>\u8bc4\u4f30 identity-based policies \u548c Organizations SCPs<\/strong><\/p>\n\n\n\n<p>Organizations SCPs \u4e0e permissions boundaries \u7c7b\u4f3c\uff0c\u4e24\u79cd policy \u5728\u4e00\u8d77\u7684\u603b\u7684\u5141\u8bb8\u6743\u9650\u662f\u4e24\u79cd policy \u6743\u9650\u7684\u4ea4\u96c6\u3002\u4efb\u4e00 policy \u4e2d\u5b58\u5728\u62d2\u7edd\u6743\u9650\uff0c\u5219\u603b\u4f53\u6743\u9650\u62d2\u7edd\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/02\/image-100.png\" alt=\"\" class=\"wp-image-9439\" width=\"409\" height=\"408\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-100.png 996w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-100-300x300.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-100-150x150.png 150w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-100-768x766.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-100-830x828.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-100-230x230.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-100-350x349.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-100-480x479.png 480w\" sizes=\"(max-width: 409px) 100vw, 409px\" \/><\/figure><\/div>\n\n\n\n<p><strong>\u8bc4\u4f30 policy \u6d41\u7a0b\uff08\u5355 AWS Account \u5185\uff09<\/strong><\/p>\n\n\n\n<p>account \u5185\u90e8 policy \u6743\u9650\u8bc4\u4f30\u6d41\u7a0b\u5982\u4e0b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"486\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/02\/image-101-1024x486.png\" alt=\"\" class=\"wp-image-9440\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-101-1024x486.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-101-300x142.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-101-768x364.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-101-830x394.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-101-230x109.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-101-350x166.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-101-480x228.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-101.png 1442w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u8bf4\u660e\uff1a<\/p>\n\n\n\n<ol><li>Deny evaluation\uff1a \u9ed8\u8ba4\u6240\u6709 request \u90fd\u662f\u62d2\u7edd\uff08\u9690\u5f0f\u62d2\u7edd\uff09\u3002AWS \u8bc4\u4f30\u6240\u6709\u4e0e request \u76f8\u5173\u7684 policy\uff08Organizations SCPs, resource-based policies, IAM permissions boundaries, role session policies, and identity-based policies\uff09\uff0c\u5982\u679c\u5728\u4efb\u4e00 policy \u4e2d\u53d1\u73b0\u4e00\u6761\u62d2\u7edd\u6743\u9650\uff0c\u5219\u8fd9\u4e2a request \u88ab\u62d2\u7edd\u6389\uff08\u663e\u5f0f\u62d2\u7edd\uff09\uff0c\u8bc4\u4f30\u6d41\u7a0b\u7ec8\u6b62\u3002\u5982\u679c\u6ca1\u6709\u53d1\u73b0\u663e\u5f0f\u62d2\u7edd\uff0c\u5219\u8bc4\u4f30\u6d41\u7a0b\u7ee7\u7eed<br><\/li><li>Organizations SCPs\uff1a \u8bc4\u4f30\u6d41\u7a0b\u5f00\u59cb\u68c0\u67e5 SCP\uff0c\u5982\u679c SCP \u4e2d\u6ca1\u6709\u53d1\u73b0\u5141\u8bb8\u7684\u6743\u9650\uff0c\u5219 request \u88ab\u9690\u5f0f\u62d2\u7edd\u6389\uff0c\u8bc4\u4f30\u6d41\u7a0b\u7ec8\u6b62\u3002\u5982\u679c\u6ca1\u6709\u542f\u7528 SCP\uff0c\u6216\u8005 SCP \u4e2d\u5b58\u5728\u5141\u8bb8\u7684\u6743\u9650\uff0c\u5219\u8bc4\u4f30\u6d41\u7a0b\u7ee7\u7eed<br><\/li><li>Resource-based policies\uff1a \u5982\u679c request \u7684 AWS \u8d44\u6e90\u5b58\u5728 Resource-based policies \u5e76\u4e14\u5176\u4e2d\u5b58\u5728\u5141\u8bb8\u7684\u6743\u9650\uff0c\u5219 request \u5141\u8bb8\u6267\u884c\uff0c\u8bc4\u4f30\u6d41\u7a0b\u7ed3\u675f\uff0c\u5982\u679c Resource-based policies \u4e2d\u6ca1\u6709\u5141\u8bb8\u7684\u6743\u9650\uff0c\u5219\u8bc4\u4f30\u6d41\u7a0b\u7ee7\u7eed<br><\/li><li>IAM permissions boundaries\uff1a AWS \u68c0\u67e5 entity\uff08\u7528\u6237\u3001\u7ec4\u6216 role\uff09\u662f\u5426\u8bbe\u7f6e permissions boundaries\u3002\u5982\u679c\u5176\u4e2d\u4e2d\u6ca1\u6709\u53d1\u73b0\u5141\u8bb8\u7684\u6743\u9650\uff0c\u5219 request \u88ab\u9690\u5f0f\u62d2\u7edd\u6389\uff0c\u8bc4\u4f30\u6d41\u7a0b\u7ec8\u6b62\u3002\u5982\u679c\u6ca1\u6709\u542f\u7528 permissions boundaries\uff0c\u6216\u8005\u5176\u4e2d\u5b58\u5728\u5141\u8bb8\u7684\u6743\u9650\uff0c\u5219\u8bc4\u4f30\u6d41\u7a0b\u7ee7\u7eed<br><\/li><li>Session policies\uff1a AWS \u68c0\u67e5\u7528\u6237\u662f\u5426\u7528 AWS CLi \u6216\u8005 AWS API \u542f\u52a8\u4e86 session\u3002\u5982\u679c session policy \u5b58\u5728\u5e76\u4e14\u5176\u4e2d\u6ca1\u6709\u53d1\u73b0\u5141\u8bb8\u7684\u6743\u9650\uff0c\u5219 request \u88ab\u9690\u5f0f\u62d2\u7edd\u6389\uff0c\u8bc4\u4f30\u6d41\u7a0b\u7ec8\u6b62\u3002\u5982\u679c\u6ca1\u6709\u542f\u7528 session policy\uff0c\u6216\u8005 session policy \u4e2d\u5b58\u5728\u5141\u8bb8\u7684\u6743\u9650\uff0c\u5219\u8bc4\u4f30\u6d41\u7a0b\u7ee7\u7eed<br><\/li><li>Identity-based policies\uff1a AWS \u68c0\u67e5\u7528\u6237\u53ca\u7528\u6237\u6240\u5728\u7684\u7ec4\u7ed1\u5b9a\u7684 policy\uff0c\u5982\u679c\u4efb\u4e00 policy \u5b58\u5728\u5141\u8bb8\u7684\u6743\u9650\uff0c\u5219 request \u5141\u8bb8\u6267\u884c\uff0c\u8bc4\u4f30\u6d41\u7a0b\u7ed3\u675f\u3002\u5982\u679c\u4efb\u4e00 policy \u4e0d\u5b58\u5728\u5141\u8bb8\u7684\u6743\u9650\uff0c\u5219 request \u88ab\u9690\u5f0f\u62d2\u7edd\u6389\uff0c\u8bc4\u4f30\u6d41\u7a0b\u7ec8\u6b62<br><\/li><li>Errors\uff1a \u5982\u679c AWS \u5728\u8bc4\u4f30\u6d41\u7a0b\u4e2d\u53d1\u751f\u9519\u8bef\uff0c\u5219\u4ea7\u751f exception \u5e76\u4e2d\u6b62<\/li><\/ol>\n\n\n\n<p><strong>8. identity-based policies \u548c resource-based policies \u4f8b\u5b50<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>identity-based policies \u548c resource-based policies \u662f\u5e73\u65f6\u7528\u7684\u6700\u591a\u7684 policy\u3002\uff08\u4e4b\u524d\u6211\u4eec\u6587\u7ae0\u4e2d\u914d\u7f6e\u7684\u5168\u90e8\u662f identity-based policies\uff09<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u4f8b\u5b50\u6765\u81ea AWS \u5b98\u7f51<\/p>\n\n\n\n<p>\u5047\u8bbe\u7528\u6237 Carlos \u6709\u4e00\u4e2a AWS IAM user \u201ccarlossalazar\u201d\uff0c\u7528\u6237 Carlos \u60f3\u5b58\u6587\u4ef6\u5230 S3 Bucket \u201ccarlossalazar-logs\u201d\u4e2d<\/p>\n\n\n\n<p>AWS IAM user \u201ccarlossalazar\u201d\u4e2d\u7ed1\u5b9a\u4e86\u5982\u4e0b<strong>identity-based policy<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"AllowS3ListRead\", #\u53ef\u9009\u9879\uff0c\u5185\u5bb9\u4efb\u610f\u5199\n            \"Effect\": \"Allow\", #\u5141\u8bb8\u4e0b\u5217\u52a8\u4f5c\uff08\u64cd\u4f5c\uff09\n            \"Action\": [\n                \"s3:ListAllMyBuckets\", #\u5217\u51faS3\u4e2d\u6240\u6709bucket\u7684\u52a8\u4f5c\n                \"s3:HeadBucket\" #\u4e0eListAllMyBuckets\u914d\u5408\u4f7f\u7528\n            ],\n            \"Resource\": \"*\" #\u901a\u914d\u7b26\u662f\u6307\u6240\u6709AWS\u8d44\u6e90\uff0c\u56e0\u4e3aAction\u4e2d\u7684\u4e24\u4e2a\u52a8\u4f5c\u90fd\u662f\u9488\u5bf9S3\u7684\uff0c\u6240\u4ee5\u8fd9\u91cc\u5c31\u662f\u6240\u6709S3\u7684\u8d44\u6e90\n        },\n        {\n            \"Sid\": \"AllowS3Self\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"s3:*\", #\u6307\u5bf9S3\u7684\u6240\u6709\u52a8\u4f5c\n            \"Resource\": [\n                \"arn:aws:s3:::carlossalazar\/*\", #AWS\u8d44\u6e90\u4e3aS3 Bucket \u201ccarlossalazar\u201d\u4e2d\u7684\u6240\u6709\u5bf9\u8c61\n                \"arn:aws:s3:::carlossalazar\" #AWS\u8d44\u6e90\u4e3aS3 Bucket \u201ccarlossalazar\u201d\n            ]\n        },\n        {\n            \"Sid\": \"DenyS3Logs\",\n            \"Effect\": \"Deny\", #\u62d2\u7edd\u4e0b\u5217\u52a8\u4f5c\n            \"Action\": \"s3:*\",\n            \"Resource\": [\n                \"arn:aws:s3:::*log*\", #AWS\u8d44\u6e90\u4e3aS3 Bucket\u540d\u79f0\u4e2d\u5305\u542b\u201clog\u201d\u7684\u6240\u6709Bucket\n                \"arn:aws:s3:::*log*\/*\" #AWS\u8d44\u6e90\u4e3aS3 Bucket\u540d\u79f0\u4e2d\u5305\u542b\u201clog\u201d\u7684\u6240\u6709Bucket\u4e2d\u7684\u6240\u6709\u5bf9\u8c61\n            ]\n        }\n    ]\n}<\/pre>\n\n\n\n<p>\u8bf4\u660e\uff1a<\/p>\n\n\n\n<ul><li>Sid\uff1a \u53ef\u9009\u9879\uff0c\u533a\u5206\u4e0d\u540c\u7684\u6743\u9650\u8bed\u53e5<\/li><li>Effect\uff1a \u8868\u793a\u5141\u8bb8\u6216\u8005\u62d2\u7edd\u6743\u9650<\/li><li>Action\uff1a \u5217\u51fa\u4e00\u7cfb\u5217\u52a8\u4f5c\uff08\u64cd\u4f5c\uff09<\/li><li>Resource\uff1a \u5bf9\u4e8e identity-based policy\uff0c\u662f\u6307\u53ef\u64cd\u4f5c\u7684 AWS \u8d44\u6e90;\u5bf9\u4e8e resource-based policies \u662f\u53ef\u9009\u9879\uff0c\u6ca1\u6709\u6307\u5b9a\u7684\u8bdd\uff0c\u6307\u88ab\u7ed1\u5b9a\u8fd9\u4e2a policy \u7684 AWS \u8d44\u6e90<\/li><li>\u201cAllowS3ListRead\u201d\u8fd9\u6bb5\u8bed\u53e5\u5141\u8bb8 IAM user \u201ccarlossalazar\u201d\u5217\u51fa S3 \u4e2d\u7684\u6240\u6709 Buckets \u540d\u79f0<\/li><li>\u201cAllowS3Self\u201d\u8fd9\u6bb5\u8bed\u53e5\u5141\u8bb8\u201ccarlossalazar\u201d\u5bf9 S3 Bucket \u201ccarlossalazar\u201d\u505a\u6240\u6709\u64cd\u4f5c<\/li><li>\u201cThe DenyS3Logs\u201d\u8fd9\u6bb5\u8bed\u53e5\u62d2\u7edd\u201ccarlossalazar\u201d\u5bf9 S3 \u4e2d\u540d\u79f0\u91cc\u542b\u6709\u201clog\u201d\u7684 Bucket \u7684\u4efb\u4f55\u64cd\u4f5c\uff08\u6240\u4ee5\u5373\u4f7f\u201cAllowS3ListRead\u201d\u4e2d\u5141\u8bb8\u5217\u51fa\u6240\u6709 Bucket \u540d\u79f0\uff0c\u5b9e\u9645\u4e0a\u201ccarlossalazar\u201d\u4e5f\u770b\u4e0d\u5230\u542b\u6709\u201clog\u201d\u7684 Bucket\uff09<\/li><\/ul>\n\n\n\n<p>S3 Bucket \u201ccarlossalazar\u201d\u4e2d\u7ed1\u5b9a\u4e86\u5982\u4e0b<strong>resource-based policy<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\", #\u5141\u8bb8\n            \"Action\": \"s3:*\", #\u5bf9S3\u7684\u4efb\u4f55\u64cd\u4f5c\n            \"Principal\": { \"AWS\": \"arn:aws:iam::111122223333:user\/carlossalazar\" }, #\u6307\u5b9a\u52a8\u4f5c\u5141\u8bb8\u6216\u62d2\u7edd\u7684\u5bf9\u50cf\u662fIAM user \u201ccarlossalazar\u201d\n            \"Resource\": \"*\" #AWS\u8d44\u6e90S3 Bucket \u201ccarlossalazar\u201d\n        }\n    ]\n}<\/pre>\n\n\n\n<p>\u8bf4\u660e\uff1a<\/p>\n\n\n\n<ul><li>Principal \u53ea\u5728 resource-based policy \u4e2d\u51fa\u73b0\uff0c\u6307\u5b9a\u5141\u8bb8\u6216\u62d2\u7edd\u7684\u7528\u6237\uff0crole \u6216\u8054\u5408\u7528\u6237\uff08federated user\uff09<\/li><li>\u8fd9\u6bb5\u8bed\u53e5\u5141\u8bb8 IAM user \u201ccarlossalazar\u201d\u5bf9 S3 Bucket \u201ccarlossalazar\u201d\u8fdb\u884c\u4efb\u4f55\u52a8\u4f5c<\/li><\/ul>\n\n\n\n<p>\u73b0\u5728\u5047\u8bbe\u6ca1\u6709 permissions boundaries\uff0c\u7528\u6237 Carlos \u5229\u7528 AWS IAM user \u201ccarlossalazar\u201d\u5b58\u6587\u4ef6\u5230 S3 Bucket \u201ccarlossalazar-<strong>logs<\/strong>\u201d\u4e2d\uff0c\u8bc4\u4f30\u6d41\u7a0b\u5982\u4e0b<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/02\/image-102-988x1024.png\" alt=\"\" class=\"wp-image-9441\" width=\"447\" height=\"462\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-102-988x1024.png 988w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-102-289x300.png 289w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-102-768x796.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-102-230x238.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-102-350x363.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-102.png 1304w\" sizes=\"(max-width: 447px) 100vw, 447px\" \/><\/figure><\/div>\n\n\n\n<p>\u8bf4\u660e\uff1a<\/p>\n\n\n\n<p>\u56e0\u4e3a identity-based policy \u4e2d\u201cThe DenyS3Logs\u201d\u8fd9\u6bb5\u8bed\u53e5\u5b58\u5728\u663e\u793a\u62d2\u7edd\uff0c\u6240\u4ee5\u8bc4\u4f30\u7ed3\u679c\u4e3a\u62d2\u7edd\uff0cCarlos \u65e0\u6cd5\u4e0a\u4f20\u6587\u4ef6\u5230 Bucket \u201ccarlossalazar-<strong>logs<\/strong>\u201d<\/p>\n\n\n\n<p>\u73b0\u5728\u7528\u6237 Carlos \u53d1\u73b0\u81ea\u5df1\u641e\u9519\u4e86\uff0c\u5b9e\u9645\u4e0a\u662f\u60f3\u5b58\u6587\u4ef6\u5230 S3 Bucket \u201ccarlossalazar\u201d\u4e2d\uff0c\u8bc4\u4f30\u6d41\u7a0b\u5982\u4e0b<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/02\/image-103-975x1024.png\" alt=\"\" class=\"wp-image-9442\" width=\"435\" height=\"457\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-103-975x1024.png 975w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-103-286x300.png 286w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-103-768x807.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-103-830x872.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-103-230x242.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-103-350x368.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-103-480x504.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/02\/image-103.png 1310w\" sizes=\"(max-width: 435px) 100vw, 435px\" \/><\/figure><\/div>\n\n\n\n<p>\u8bf4\u660e\uff1a<\/p>\n\n\n\n<p>\u4e24\u79cd policy \u4e2d\u90fd\u6ca1\u6709\u62d2\u7edd\u64cd\u4f5c\uff0c\u5e76\u4e14\u5b58\u5728\u5141\u8bb8\u64cd\u4f5c\uff0c\u6240\u4ee5\u7528\u6237 Carlos \u5b58\u6587\u4ef6\u5230 S3 Bucket \u201ccarlossalazar\u201d\u6210\u529f<\/p>\n\n\n\n<p><strong>9. \u663e\u5f0f\u62d2\u7edd\u548c\u9690\u5f0f\u62d2\u7edd<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u6700\u540e\u518d\u8bf4\u4e00\u4e0b\u663e\u5f0f\u62d2\u7edd\u548c\u9690\u5f0f\u62d2\u7edd\u7684\u533a\u522b\u3002<\/p>\n\n\n\n<p>\u5982\u679c request \u88ab\u62d2\u7edd\u662f\u56e0\u4e3a\u8bc4\u4f30\u65f6\u7528\u5230\u7684\u4efb\u4e00 policy \u4e2d\u6709\u4e00\u6761\u62d2\u7edd\u7684\u8bed\u53e5\uff0c\u8fd9\u79cd\u60c5\u51b5\u5c31\u662f<strong>\u663e\u5f0f\u62d2\u7edd<\/strong>\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e00\u79cd\u64cd\u4f5c\uff0c\u5982\u679c policy \u4e2d\u65e2\u5b58\u5728\u5141\u8bb8\u8bed\u53e5\uff0c\u53c8\u5b58\u5728\u62d2\u7edd\u8bed\u53e5\uff0c\u5219\u62d2\u7edd\u9ad8\u4e8e\u5141\u8bb8\uff0c\u6700\u7ec8\u7ed3\u679c\u4e3a\u62d2\u7edd\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e00\u79cd\u64cd\u4f5c\uff0c\u5982\u679c policy \u4e2d\u65e2\u6ca1\u6709\u5141\u8bb8\u8bed\u53e5\uff0c\u4e5f\u6ca1\u6709\u62d2\u7edd\u8bed\u53e5\uff0c\u5219\u6700\u7ec8\u7ed3\u679c\u4e3a\u62d2\u7edd\uff0c\u8fd9\u79cd\u5c31\u662f<strong>\u9690\u5f0f\u62d2\u7edd<\/strong>\u3002<\/p>\n\n\n\n<p>\u5f53\u8bbe\u8ba1\u6388\u6743 policy \u65f6\uff0c\u53ef\u4ee5\u7efc\u5408\u5229\u7528\u5141\u8bb8\u3001\u663e\u5f0f\u62d2\u7edd\u548c\u9690\u5f0f\u62d2\u7edd<\/p>\n\n\n\n<p>\u6bd4\u5982\u53ef\u4ee5\u628a\u4e0b\u9762 identity-based policy \u7ed1\u5b9a\u5728 Administor group \u4e2d\uff0c\u8fd9\u6837\u6240\u6709\u6b64 group \u4e0b\u7684\u7ba1\u7406\u5458\u7528\u6237\uff0c\u9664\u4e86\u4e0d\u80fd\u8bbf\u95ee billing\uff0c\u6709 AWS \u7684\u5168\u90e8\u6743\u9650\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": \"*\",\n            \"Resource\": \"*\"\n        },\n        {\n            \"Effect\": \"Deny\",\n            \"Action\": \"aws-portal:*\",\n            \"Resource\": \"*\"\n        }\n    ]\n}<\/pre>\n\n\n\n<p>\u53ef\u4ee5\u628a\u4e0b\u5217 polic \u8d4b\u4e88\u7ed9\u67d0\u4e2a\u7528\u6237\uff0c\u8ba9\u8fd9\u4e2a\u7528\u6237\u53ef\u4ee5\u7ba1\u7406\u7528\u6237\uff0c\u4f46\u662f\u4e0d\u80fd\u7ba1\u7406 group \u548c\u5176\u5b83 AWS \u8d44\u6e90\uff08\u9690\u5f0f\u62d2\u7edd\uff09<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": {\n        \"Effect\": \"Allow\",\n        \"Action\": [\n            \"iam:AttachUserPolicy\",\n            \"iam:CreateUser\",\n            \"iam:DeleteUser\",\n            \"iam:DeleteUserPolicy\",\n            \"iam:DetachUserPolicy\",\n            \"iam:GetUser\",\n            \"iam:GetUserPolicy\",\n            \"iam:ListAttachedUserPolicies\",\n            \"iam:ListUserPolicies\",\n            \"iam:ListUsers\",\n            \"iam:PutUserPolicy\",\n            \"iam:UpdateUser\"\n        ],\n        \"Resource\": \"*\"\n    }\n}\n<\/pre>\n\n\n\n<p><strong>\u603b\u7ed3<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>IAM \u68c0\u67e5\u6743\u9650\u7684\u6574\u4e2a\u8fc7\u7a0b\u6bd4\u8f83\u590d\u6742\uff0c\u4f46\u662f\u5e73\u65f6\u4f7f\u7528\u63a5\u89e6\u591a\u7684\u4e00\u822c\u662f identity-based policy \u548c resource-based policy\uff0c\u628a\u8fd9\u4e24\u4e2a\u5f04\u660e\u767d\u4e86\uff0c\u57fa\u672c\u4e0a\u53ef\u4ee5\u89e3\u51b3\u5927\u90e8\u5206\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb \u5728\u4e4b\u524d\u7684\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u591a\u6b21\u63d0\u5230\u8d4b\u4e88\u6743\u9650\u65f6\u9700\u8981\u7528 Role\uff0cPolicy\u3002 \u4e8b\u5b9e\u4e0a\u5728\u5229\u7528 AWS \u4efb\u4f55\u8d44\u6e90\u4e4b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,9],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/9433"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9433"}],"version-history":[{"count":1,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/9433\/revisions"}],"predecessor-version":[{"id":9443,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/9433\/revisions\/9443"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}