Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example access policy? #40

Closed
MichaelJCole opened this issue Aug 30, 2016 · 2 comments
Closed

Example access policy? #40

MichaelJCole opened this issue Aug 30, 2016 · 2 comments
Labels

Comments

@MichaelJCole
Copy link

Sorry to be newb on the aws, but what's an example IAM policy?

var config = {
  "useIAM": true,
  "accessKeyId": "asdfasdfasdf",
  "secretAccessKey": "adsfasdfasdf"
}

w/ a policy of:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::bucket.com"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::bucket.com/*"
            ]
        }
    ]
}
@MichaelJCole
Copy link
Author

MichaelJCole commented Aug 30, 2016

If you're reading this with an AccessDenied error, try this policy or something like it:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::example.com"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:*"
            ],
            "Resource": [
                "arn:aws:s3:::example.com/*"
            ]
        }
    ]
}

@clineamb
Copy link
Owner

clineamb commented Sep 8, 2016

So, using an IAM with this gulp plugin does not use a "policy" to log on to the S3 Service. The "IAM" setting allows your computer to connect with AWS's various services (in this case, S3), without using a key or login (see #12, and #13).

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants