-
Notifications
You must be signed in to change notification settings - Fork 140
An example how to set up S3 buckets for Lookerbot #119
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
Open
osigida
wants to merge
1
commit into
looker:master
Choose a base branch
from
osigida:AWS-bucket-setup-example
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does it need GetObject or DeleteObject? Just PutObject and PutObjectAcl should be fine. |
||
| "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 object's 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. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't actually needed at all.