IAM Policy setting (suggestion: improve permission error reporting)
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- aws, javascript, node.js
調査の方向性
Start in lib/main.js at line 889, where the issue identifies permission errors being treated as a nonexistent function. Reproduce the deployment with the IAM policy described in the issue and trace the AWS Lambda error handling; done means permission failures report the actual permission problem instead of “Function already exist.”
索引モデルが issue の本文から書いたものです。
説明
If this is already somewhere please point it out.
I started with this policy from travis, but node-lambda required a lot more permissions then this:
https://docs.travis-ci.com/user/deployment/lambda/
I was getting this error ResourceConflictException: Function already exist, incorrectly.
Eventually I figured out the error reporting for permissions is very bad in node-lambda. It assumes any permission error is just a non existent function. https://github.com/motdotla/node-lambda/blob/master/lib/main.js#L889
This is the latest version of my IAM policy to get a deploy without errors:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ListExistingRolesAndPolicies",
"Effect": "Allow",
"Action": [
"iam:ListRolePolicies",
"iam:ListRoles"
],
"Resource": "*"
},
{
"Sid": "CreateAndListFunctions",
"Effect": "Allow",
"Action": [
"lambda:CreateFunction",
"lambda:ListFunctions",
"lambda:ListEventSourceMappings"
],
"Resource": "*"
},
{
"Sid": "DeployCode",
"Effect": "Allow",
"Action": [
"lambda:GetFunction",
"lambda:UpdateFunctionCode",
"lambda:UpdateFunctionConfiguration"
],
"Resource": [
"arn:aws:lambda:us-east-1:12345:function:abc",
"arn:aws:lambda:us-east-1:12345:function:abcdef",
"arn:aws:lambda:us-east-1:12345:function:whatever"
]
},
{
"Sid": "SetRole",
"Effect": "Allow",
"Action": [
"iam:PassRole"
],
"Resource": "arn:aws:iam::12345:role/exec_role"
},
{
"Sid": "S3Uploads",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": "arn:aws:s3:::mybucket/test/lambdas/*"
},
{
"Sid": "LogsPermission",
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:PutRetentionPolicy"
],
"Resource": "*"
}
]
}
From travis's doc: It does not appear to be possible to wildcard the DeployCode statement
- 主要言語
- JavaScript
- スター
- 1.4k
- フォーク
- 185
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
motdotla/node-lambda のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
motdotla/node-lambda#840 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
motdotla/node-lambda#641 · コメント 6 件 · リアクション 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
motdotla/node-lambda#618 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
motdotla/node-lambda#544 · リアクション 1 件 ·
-
question
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
motdotla/node-lambda#537 · コメント 2 件 · リアクション 1 件 ·
motdotla/node-lambda の issue をすべて見る
似ている issue
-
bot:ai-assisted component:compact-js status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
midnightntwrk/midnight-sdk#403 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100