deploy command not picking up deploy.env variables
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- aws, javascript, node.js
Research direction
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.
Written by the indexing model from the issue text.
Description
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 } }
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 185
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from motdotla/node-lambda
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
motdotla/node-lambda#840 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
motdotla/node-lambda#641 · 6 comments · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
motdotla/node-lambda#618 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 30/100
motdotla/node-lambda#544 · 1 reaction ·
-
question
Difficulty 4/5 3-5 days Newbie friendliness 25/100
motdotla/node-lambda#537 · 2 comments · 1 reaction ·
All issues in motdotla/node-lambda
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·