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

it's really important to be transparent with user which policy they n… #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 60 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ myFunction:

# if you'd like to include any shims
shims:
- ../shims/shim.js
- ../shims/shim.js

# specifying an existing deployment bucket would optimise deployment speed
# by using accelerated multipart uploads and dependency management with layers
Expand All @@ -99,9 +99,9 @@ aws-lambda (master)$ components
shims: []
handler: 'handler.hello'
runtime: 'nodejs8.10'
env:
env:
TABLE_NAME: my-table
role:
role:
name: 'serverless'
arn: 'arn:aws:iam::552760238299:role/serverless'
service: 'lambda.amazonaws.com'
Expand All @@ -118,6 +118,63 @@ For a real world example of how this component could be used, [take a look at ho

 

### Suggested Policy

We recommend you to create an user for your application with following policies:

```json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"logs:PutLogEvents",
"logs:CreateLogStream",
"s3:CreateBucket",
"s3:GetObject",
"s3:GetBucketCORS",
"s3:GetBucketPolicy",
"s3:GetObjectAcl",
"s3:GetBucketAcl",
"s3:DeleteBucket",
"s3:DeleteObject",
"s3:DeleteBucketWebsite",
"s3:DeleteBucketPolicy",
"s3:PutObject",
"s3:PutObjectAcl",
"s3:PutBucketAcl",
"s3:PutBucketCORS",
"s3:PutBucketPolicy",
"s3:PutBucketWebsite",
"lambda:AddLayerVersionPermission",
"lambda:PublishVersion",
"lambda:CreateFunction",
"lambda:GetFunctionConfiguration",
"lambda:DeleteLayerVersion",
"lambda:DeleteFunction",
"lambda:UpdateFunctionCode",
"lambda:UpdateFunctionConfiguration",
"iam:AttachRolePolicy",
"iam:AttachUserPolicy",
"iam:CreateRole",
"iam:DeleteRole",
"iam:DeleteRolePolicy",
"iam:DetachRolePolicy",
"iam:DetachUserPolicy",
"iam:UpdateAssumeRolePolicy",
"iam:PassRole",
"iam:PutRolePolicy",
"iam:PutUserPolicy",
"iam:GetRole"
],
"Resource": "*"
}
]
}
```

### New to Components?

Checkout the [Serverless Components](https://github.com/serverless/components) repo for more information.