json AWS for Packer要求的最小IAM策略.https://github.com/mitchellh/packer权限由API函数分解

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json AWS for Packer要求的最小IAM策略.https://github.com/mitchellh/packer权限由API函数分解相关的知识,希望对你有一定的参考价值。

{
    "Statement": [
        {
            "Sid": "PackerSecurityGroupAccess",
            "Action": [
                "ec2:CreateSecurityGroup",
                "ec2:DeleteSecurityGroup",
                "ec2:DescribeSecurityGroups",
                "ec2:AuthorizeSecurityGroupIngress",
                "ec2:RevokeSecurityGroupIngress"
            ],
            "Effect": "Allow",
            "Resource": [
                "*"
            ]
        },
        {
            "Sid": "PackerAMIAccess",
            "Action": [
                "ec2:CreateImage",
                "ec2:RegisterImage",
                "ec2:DeregisterImage",
                "ec2:DescribeImages"
            ],
            "Effect": "Allow",
            "Resource": [
                "*"
            ]
        },
        {
            "Sid": "PackerSnapshotAccess",
            "Action": [
                "ec2:CreateSnapshot",
                "ec2:DeleteSnapshot",
                "ec2:DescribeSnapshots"
            ],
            "Effect": "Allow",
            "Resource": [
                "*"
            ]
        },
        {
            "Sid": "PackerInstanceAccess",
            "Action": [
                "ec2:RunInstances",
                "ec2:StartInstances",
                "ec2:StopInstances",
                "ec2:RebootInstances",
                "ec2:TerminateInstances",
                "ec2:DescribeInstances",
                "ec2:CreateTags"
            ],
            "Effect": "Allow",
            "Resource": [
                "*"
            ]
        },
        {
            "Sid": "PackerKeyPairAccess",
            "Action": [
                "ec2:CreateKeyPair",
                "ec2:DeleteKeyPair",
                "ec2:DescribeKeyPairs"
            ],
            "Effect": "Allow",
            "Resource": [
                "*"
            ]
        },
        {
            "Sid": "PackerS3Access",
            "Action": [
                "s3:Get*",
                "s3:List*",
                "s3:PutObject*",
                "s3:DeleteObject*"
            ],
            "Effect": "Allow",
            "Resource": [
                "*"
            ]
        },
        {
            "Sid": "PackerS3BucketAccess",
            "Action": [
                "s3:ListAllMyBuckets",
                "s3:CreateBucket"
            ],
            "Effect": "Allow",
            "Resource": [
                "*"
            ]
        }
    ]
}

以上是关于json AWS for Packer要求的最小IAM策略.https://github.com/mitchellh/packer权限由API函数分解的主要内容,如果未能解决你的问题,请参考以下文章

Packer AWS 为英特尔处理器实例选择哪些基础映像

json Packer社区插件 - Windows 2012安装示例

json 在Packer Builder实例上安装Ansible。

Packer 自定义映像构建失败并出现 ssh 身份验证错误

从键盘上输入N个数保存到数组中,要求找出最小的数及其下标,然后把它和数组中最前面的元素兑换位置

golang Amazon S3使用AWS SDK for Go选择带有JSON的示例