awslabs / fargatecli

CLI for AWS Fargate
Apache License 2.0
893 stars 114 forks source link

Document IAM permissions required per command #19

Closed siddarthsreeni-zz closed 6 years ago

siddarthsreeni-zz commented 6 years ago

Hi, Can you post your IAM roles required for running a task by a user. I seem to have caught an error. Heres the error


[!] Couldn't register ECS task definition
AccessDeniedException: User: arn:aws:iam::*******:user/<username> is not author                                                                                                                     ized to perform: iam:PassRole on resource: arn:aws:iam::*********:role/ecsTas                                                                                                                     kExecutionRole
        status code: 400, request id: f31c6334-03e8-11e8-aaf9-1f6bfe37bc80

I am sure there will be more errors after i give the required IAMroles. Since, I'm not admin. I would like to know all the required IAM roles for running a docker on fargate.

BTW, great project! loved it

siddarthsreeni-zz commented 6 years ago

nvm, these are the inline permissions needed to be used used.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1482712489000",
            "Effect": "Allow",
            "Action": [
                "iam:CreateRole",
                "iam:PutRolePolicy",
                "lambda:CreateFunction",
                "lambda:InvokeAsync",
                "lambda:InvokeFunction",
                "iam:PassRole",
                "lambda:UpdateAlias",
                "lambda:CreateAlias",
                "lambda:GetFunctionConfiguration",
                "lambda:AddPermission",
                "lambda:UpdateFunctionCode"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}
jpignata commented 6 years ago

Thanks for posting! At a glance, I'm a bit confused about all of the lambda:* permissions. Are you sure this is the document you meant to post?