Have check that the environment has set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY and also has checked both of the key is not expired
Using the same AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY the greengrass.service can connect to aws
however the idt shows the error
the log under logs/lambdadeployment/lambdaDeploymentTest
shows
update the log in below
2023-03-15T10:03:37.995Z [INFO] (main) com.aws.greengrass.util.platforms.Platform: Getting platform instance com.aws.greengrass.util.platforms.unix.linux.LinuxPlatform.. {}
2023-03-15T10:03:38.136Z [INFO] (main) com.aws.greengrass.lifecyclemanager.Kernel: No ongoing deployment detected. Proceed as default. {}
2023-03-15T10:03:38.506Z [INFO] (main) com.aws.greengrass.config.Configuration: config-loading. Read configuration from a file path. {path=/test/greengrass/v2/config/config.tlog}
2023-03-15T10:03:38.711Z [INFO] (main) com.aws.greengrass.lifecyclemanager.Kernel: effective-config-dump-complete. {file=/test/greengrass/v2/config/effectiveConfig.yaml}
2023-03-15T10:03:39.243Z [INFO] (main) com.aws.greengrass.deployment.DeviceConfiguration: Copy Nucleus artifacts to component store. {destination=/test/greengrass/v2/packages/artifacts-unarchived/aws.greengrass.Nucleus/2.9.4/aws.greengrass.nucleus, source=/test/GreengrassInstaller}
2023-03-15T10:03:45.808Z [ERROR] (main) com.aws.greengrass.easysetup.GreengrassSetup: Error while trying to setup Greengrass Nucleus. {}
software.amazon.awssdk.services.iot.model.IotException: The security token included in the request is invalid. (Service: Iot, Status Code: 403, Request ID: 58a47128-daf5-4850-8b45-bdd4985dcd5b)
here is my idts/config.json
`{
"log": {
"location": "../logs/"
},
"configFiles": {
"root": "../configs",
"device": "../configs/device.json"
},
"testPath": "../tests/",
"reportPath": "../results/",
"certificatePath": "../certificates/",
"awsRegion": "us-west-2",
"auth": {
"method": "environment"
}
}
`
update the lambdaDeplaymentTest log in below
time="2023-03-25T09:32:14+08:00" level=info msg="Device architecture: aarch64"
time="2023-03-25T09:32:15+08:00" level=info msg="Executing lambda deployment test setup"
time="2023-03-25T09:32:15+08:00" level=info msg="Fetching installed Greengrass provisioning configuration"
time="2023-03-25T09:32:15+08:00" level=warning msg="Encountered error fetching provisioned Thing: InvalidParameter: 1 validation error(s) found.\n- minimum field size of 1, DescribeThingInput.ThingName.\n"
time="2023-03-25T09:32:15+08:00" level=error msg="Setting up device for testing failed with error Encountered error fetching provisioned Thing: InvalidParameter: 1 validation error(s) found.\n- minimum field size of 1, DescribeThingInput.ThingName.\n"
time="2023-03-25T09:32:15+08:00" level=info msg="Cleaning up test resources..."
time="2023-03-25T09:32:15+08:00" level=info msg="Executing lambda deployment test cleanup"
time="2023-03-25T09:32:15+08:00" level=info msg="Pulled component logs to /home/user/test/devicetester_greengrass_v2_linux/results/20230325T093026/logs/lambdadeployment/lambdaDeploymentTest/.log"
time="2023-03-25T09:32:15+08:00" level=warning msg="Copying lambda component log from DUT failed: Command '{sudo /test/greengrass/tmp/busybox cat /test/greengrass/v2/logs/.log map[] 0s}' exited with code 1. Error output: cat: can't open '/test/greengrass/v2/logs/.log': No such file or directory\n."
time="2023-03-25T09:32:15+08:00" level=warning msg="Deleting lambda qualification component failed: failed to get componentArn"
time="2023-03-25T09:32:15+08:00" level=info msg="Skipping the cleanup of installed Greengrass"
after days of research I found out that my effectiveConfig.yaml might be the reason why cause all of this
Tell me if I was wrong
I think the reason why it cause those error is because the effectiveConfig.yaml is not correctly set
however
as long as I know at the begining I just follow https://docs.aws.amazon.com/greengrass/v2/developerguide/quick-installation.html
the quick installation . Without correctly setting the effectiveConfig.yaml how come can it connect to aws correctly ?
what is the mainly diff between https://docs.aws.amazon.com/greengrass/v2/developerguide/manual-installation.html two of the guide
What should I set if I want to correctly run pass IDT
the effectiveConfig.yaml below is not the one on my device just the clarify what I am saying
system:
certificateFilePath: ""
privateKeyPath: ""
rootCaPath: ""
rootpath: "/test/greengrass/v2"
thingName: ""
services:
aws.greengrass.Nucleus:
componentType: "NUCLEUS"
configuration:
awsRegion: "ap-east-1"
componentStoreMaxSizeBytes: 10000000000
deploymentPollingFrequencySeconds: 15
httpClient: {}
iotCredEndpoint: ""
iotDataEndpoint: ""
jvmOptions: "-Dlog.store=FILE"
logging: {}
mqtt:
spooler: {}
networkProxy:
proxy: {}
platformOverride: {}
runWithDefault:
posixUser: "ggc_user:ggc_group"
telemetry: {}
dependencies: []
lifecycle:
bootstrap:
requiresPrivilege: true
script: "\nset -eu\nKERNEL_ROOT=\"/test/greengrass/v2\"\nUNPACK_DIR=\"/test/greengrass/v2/packages/artifacts-unarchived/aws.greengrass.Nucleus/2.9.4/aws.greengrass.nucleus\"\
\nrm -r \"$KERNEL_ROOT\"/alts/current/*\necho \"-Dlog.store=FILE\" > \"\
$KERNEL_ROOT/alts/current/launch.params\"\nln -sf \"$UNPACK_DIR\" \"$KERNEL_ROOT/alts/current/distro\"\
\nexit 100"
version: "2.9.4"
DeploymentService:
dependencies: []
version: "0.0.0"
FleetStatusService:
dependencies: []
main:
dependencies:
- "aws.greengrass.Nucleus"
- "aws.greengrass.Nucleus"
lifecycle: {}
TelemetryAgent:
dependencies: []
runtime:
lastPeriodicAggregationMetricsTime: 1679723443207
lastPeriodicPublishMetricsTime: 1679723443208
version: "0.0.0"
UpdateSystemPolicyService:
dependencies: []
version: "0.0.0"
anyone know what happened?
Hello @loordb, It looks like you are using the pre-installed use of IDT which allows for a pre-installed version of greengrass to be used with IDT. If you used the standard use of IDT, IDT would configure the effectiveConfig for you automatically.
However, in your case, please see the section https://docs.aws.amazon.com/greengrass/v2/developerguide/set-config.html#userdata-config under the "PreInstalled" field description. This section should give you insight on how to properly configure greengrass to run with IDT.
Regards.