IAM Policy setting (suggestion: improve permission error reporting)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- aws, javascript, node.js
Hướng nghiên cứu
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.”
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- JavaScript
- Star
- 1.4k
- Fork
- 185
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của motdotla/node-lambda
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
motdotla/node-lambda#840 · 1 bình luận ·
-
Migration to AWS SDK v3 Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
motdotla/node-lambda#641 · 6 bình luận · 2 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
motdotla/node-lambda#618 ·
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
motdotla/node-lambda#544 · 1 reaction ·
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
motdotla/node-lambda#537 · 2 bình luận · 1 reaction ·
Tất cả issue của motdotla/node-lambda
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
avniproject/avni-client#2135 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bevyengine/bevy-website#2595 ·
-
ecosystem wording
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
matrix-org/matrix.org#3649 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
vadimdemedes/ink#1029 ·