- Newest
- Most votes
- Most comments
Hi yichen,
IDT needs AWS credentials to run, and allows two way to provision them using credentials file and environment variables(https://docs.aws.amazon.com/greengrass/latest/developerguide/set-config.html).
Based on your config file given below, you seem to be using environment variables( see "auth" set in config.json). The console output shows "AWS credentials not found: EnvAccessKeyNotFound: AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY not found in environment".
IDT is expecting AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY set as environment variables to run. Please set these variables and export them as environment variables. Refer https://docs.aws.amazon.com/greengrass/latest/developerguide/set-config.html for more details.
Thanks,
Hi
I already tried but not working.
yichen@yichen-desktop:/devicetester_greengrass_linux/configs$ cat /devicetester_greengrass_linux/configs$ export AWS_ACCESS_KEY_ID=*********************/.aws/credentials/devicetester_greengrass_linux/configs$ cat config.json
[default]
aws_access_key_id = *********************
aws_secret_access_key = *********************
yichen@yichen-desktop:
{
"log": {
"location": "../logs/"
},
"configFiles": {
"root": "../configs",
"device": "../configs/device.json"
},
"testPath": "../tests/",
"reportPath": "../results/",
"certificatePath": "../certificates/",
"awsRegion": "us-west-2",
"auth": {
"method": "environment"
}
}yichen@yichen-desktop:
yichen@yichen-desktop:/devicetester_greengrass_linux/configs$ export AWS_SECRET_ACCESS_KEY=*********************/devicetester_greengrass_linux/configs$ export -p | grep AWS
yichen@yichen-desktop:
declare -x AWS_ACCESS_KEY_ID=""
declare -x AWS_SECRET_ACCESS_KEY=""
yichen@yichen-desktop:~/devicetester_greengrass_linux/configs$ sudo ./../bin/devicetester_linux_x86-64 run-suite
[sudo] password for yichen:
time="2019-10-03T08:31:38+08:00" level=info msg=Using suite: GGQ_1
time="2019-10-03T08:31:38+08:00" level=info msg=Using pool: 1
time="2019-10-03T08:31:38+08:00" level=info msg=Running test case... suiteId=GGQ groupId=version testCaseId=ggc_version_check_test deviceId=123 executionId=28f97589-e575-11e9-9731-0800276f39d9
time="2019-10-03T08:31:38+08:00" level=error msg=AWS credentials not found: EnvAccessKeyNotFound: AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY not found in environment suiteId=GGQ groupId=version testCaseId=ggc_version_check_test deviceId=123 executionId=28f97589-e575-11e9-9731-0800276f39d9
time="2019-10-03T08:31:38+08:00" level=info msg=Finished running test case... executionId=28f97589-e575-11e9-9731-0800276f39d9 suiteId=GGQ groupId=version testCaseId=ggc_version_check_test deviceId=123
time="2019-10-03T08:31:38+08:00" level=info msg=--- FAIL: TestGGCVersion (0.00s) testCaseId=ggc_version_check_test deviceId=123 executionId=28f97589-e575-11e9-9731-0800276f39d9 suiteId=GGQ groupId=version
time="2019-10-03T08:31:38+08:00" level=info msg=FAIL deviceId=123 executionId=28f97589-e575-11e9-9731-0800276f39d9 suiteId=GGQ groupId=version testCaseId=ggc_version_check_test
time="2019-10-03T08:31:38+08:00" level=error msg=Test exited unsuccessfully testCaseId=ggc_version_check_test error=exit status 1 executionId=28f97589-e575-11e9-9731-0800276f39d9
time="2019-10-03T08:31:38+08:00" level=info msg=All tests finished. executionId=28f97589-e575-11e9-9731-0800276f39d9
time="2019-10-03T08:31:38+08:00" level=info msg=
========== Test Summary ==========
Execution Time: 1s
Tests Completed: 1
Tests Passed: 0
Tests Failed: 1
Tests Skipped: 0
Test Groups:
version: FAILED
Failed Tests:
Group Name: version
Test Name: Test GGC Version version
Reason: [Error: 106] ValidationError: AWS credentials not found: EnvAccessKeyNotFound: AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY not found in environment. Refer to the logs and troubleshooting section of IDT User Guide https://docs.aws.amazon.com/greengrass/latest/developerguide/device-tester-for-greengrass-ug.html for more information.
Path to AWS IoT Device Tester Report: /home/yichen/devicetester_greengrass_linux/results/28f97589-e575-11e9-9731-0800276f39d9/awsiotdevicetester_report.xml
Path to Test Execution Logs: /home/yichen/devicetester_greengrass_linux/results/28f97589-e575-11e9-9731-0800276f39d9/logs
Path to Aggregated JUnit Report: /home/yichen/devicetester_greengrass_linux/results/28f97589-e575-11e9-9731-0800276f39d9/GGQ_Report.xml
Hi yichen,
You have two ways to fix this:
1). You can just run IDT without using sudo command: ./devicetester_linux_x86-64 run-suite
.
Because when you use sudo, it will open a new shell which will not have the environment variables you configured before.
2). I noticed that you have configured ~/.aws/credentials, the other way to fix this is to change your config.json to use file instead of environment.
i.e.
"auth": {
"method": "file",
"credentials": {"profile": "default"}
}
Please go to https://docs.aws.amazon.com/greengrass/latest/developerguide/set-config.html for more details.
Thanks
Edited by: aws-jessica on Oct 3, 2019 4:18 PM
Relevant content
- asked 2 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago