stevearc / pypicloud-docker

Docker image for pypicloud
MIT License
86 stars 34 forks source link

AWS DynamoDB cache policy #17

Closed sdanbury closed 6 years ago

sdanbury commented 6 years ago

Hey!

I just setup DynamoDB for caching with pypicloud. Pretty painless experience, thanks a lot!

I couldn't find anything in the docs that outlined the AWS permissions required for pypicloud (apologies if I am being silly and it is clearly there). Let me know if I should create a PR for the docs, but for ease, here were the permissions I needed to add to my pypicloud AWS policy to get it to work:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::<package-bucket-name>"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:DeleteObject"
            ],
            "Resource": "arn:aws:s3:::<package-bucket-name>/*"
        }
        {
            "Effect": "Allow",
            "Action": [
                "dynamodb:CreateTable",
                "dynamodb:BatchWriteItem",
                "dynamodb:BatchGetItem",
                "dynamodb:PutItem",
                "dynamodb:DescribeTable",
                "dynamodb:ListTables",
                "dynamodb:Scan",
                "dynamodb:Query",
                "dynamodb:UpdateItem",
                "dynamodb:DeleteTable"
            ],
            "Resource": "*"
        }
    ]
}
sdanbury commented 6 years ago

Closing issue and opening a new issue in the main repo. Apologies for the inconvenience.