deploy command not picking up deploy.env variables
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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 with the deploy command in package.json, deploy.env, and the credential-related code around lib/main.js lines 700-701. Trace how --configFile values and other node-lambda CLI parameters reach the AWS request, then verify deployment with the reported configuration succeeds without the invalid-token error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
In my package.json I have the following deploy command in scripts:
"scripts": {
"deploy": "node-lambda deploy --configFile deploy.env --prebuiltDirectory dist",
My deploy.env is:
AWS_ACCESS_KEY_ID=xxx
AWS_SECRET_ACCESS_KEY=yyy
If I log the key and secret key here I get this:
your_key your_secret
followed by this error:
The security token included in the request is invalid.
UnrecognizedClientException: The security token included in the request is invalid.
at Object.extractError (MY_PROJECT\node_modules\aws-sdk\lib\protocol\json.js:48:27)
at Request.extractError (MY_PROJECT\node_modules\aws-sdk\lib\protocol\rest_json.js:37:8)
at Request.callListeners (MY_PROJECT\node_modules\aws-sdk\lib\sequential_executor.js:105:20)
at Request.emit (MY_PROJECT\node_modules\aws-sdk\lib\sequential_executor.js:77:10)
at Request.emit (MY_PROJECT\node_modules\aws-sdk\lib\request.js:678:14)
at Request.transition (MY_PROJECT\node_modules\aws-sdk\lib\request.js:22:10)
at AcceptorStateMachine.runTo (MY_PROJECT\node_modules\aws-sdk\lib\state_machine.js:14:12)
at MY_PROJECT\node_modules\aws-sdk\lib\state_machine.js:26:10
at Request.<anonymous> (MY_PROJECT\node_modules\aws-sdk\lib\request.js:38:9)
at Request.<anonymous> (MY_PROJECT\node_modules\aws-sdk\lib\request.js:680:12)
I'm not sure what the problem is here. Can I not use a combination of --configFile and other node-lambda CLI parameters?
The env vars are in the params if I print those out:
params { FunctionName: 'MY_FUNCTION_NAME',
Code: { ZipFile: <Buffer 50 4b 03 04 0a 00 00 00 08 00 49 58 bd 4a 9e b6 b4 2d 70 ff 07 00 81 ac 24 00 08 00 00 00 69 6e 64 65 78 2e 6a 73 ec bd 7b 7b 1b 37 ae 38 fc 7f 9e e7 ... > },
Handler: 'index.handler',
Role: 'your_amazon_role',
Runtime: 'nodejs6.10',
Description: '',
MemorySize: '128',
Timeout: '3',
Publish: false,
VpcConfig: { SubnetIds: [], SecurityGroupIds: [] },
Environment:
{ Variables:
{ AWS_ACCESS_KEY_ID: 'xxx',
AWS_SECRET_ACCESS_KEY: 'yyy' } },
DeadLetterConfig: { TargetArn: null },
TracingConfig: { Mode: null } }
- 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 ·