forked from looker/lookerbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
An example how to set up S3 buckets for Lookerbot
partially fixes looker#31
- Loading branch information
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
.env | ||
docker-compose.yml | ||
npm-debug.log | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# AWS S3 Bucket access setup example | ||
|
||
To keep AWS infrastructure safe and out of risk to leak any data through Lookerbot account | ||
it is better to create dedicated AMI user, S3 Bucket and restrict access for the user only to the bucket. | ||
|
||
Here is an example how to achieve that: | ||
|
||
1. Create an S3 Bucket, f.ex. `lookerbot-s3-bucket`.<br /> | ||
It should stay private. No special configuration required. | ||
|
||
2. Create an IAM policy, named f.ex `lookerbot-policy`, like | ||
``` | ||
{ | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"s3:ListBucket" | ||
], | ||
"Resource": [ | ||
"arn:aws:s3:::lookerbot-s3-bucket" | ||
] | ||
}, | ||
{ | ||
"Effect": "Allow", | ||
"Action": [ | ||
"s3:PutObject", | ||
"s3:PutObjectAcl", | ||
"s3:GetObject", | ||
"s3:DeleteObject" | ||
], | ||
"Resource": [ | ||
"arn:aws:s3:::lookerbot-s3-bucket/*" | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
The policy consists of 2 sections: | ||
- first allows to list the bucket itself, | ||
- seconds allows to put, get and delete objects in the bucket and to put objects ACL | ||
|
||
More on ARN bucket names could be found on [AWS Docs](http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-s3) | ||
|
||
3. Create an IAM account, f.ex `lookerbot`. <br /> | ||
Enable `Programmatic access` only. | ||
|
||
4. Go to the summary page for `lookerbot` user. <br /> | ||
On `Permissions` section add `lookerbot-policy` to it. |