Hey there,
I've been trying to send the logs of my IoT Greengrass core device to Cloudwatch following this guide. It says to create a deployment and inserting this:
{
"logsUploaderConfiguration": {
"systemLogsConfiguration": {
"uploadToCloudWatch": "true"
}
}
}
and this, accordingly:
{
"logsUploaderConfiguration": {
"componentLogsConfigurationMap": {
"com.example.HelloWorld": {
}
}
}
}
I just don't get how and where I have to insert those. It's really not explained that much... My last attempt was to create a deployment.json file that looked as follows and push it to AWS through the CLi command aws greengrassv2 create-deployment --cli-input-json file://deployment.json
, but that doesn't work:
{
"targetArn": "arn:aws:iot:<myregion>:<mynumber>:thinggroup/groupname",
"deploymentName": "test_deployments",
"components": {
"aws.greengrass.Cloudwatch": {
"componentVersion": "3.1.0"
},
"aws.greengrass.LogManager": {
"componentVersion": "2.3.1",
"logsUploaderConfiguration": {
"systemLogsConfiguration": {
"uploadToCloudWatch": "true"
},
"componentLogsConfigurationMap":{
"com.example.MyPrivateDockerComponent": {
}
}
}
},
"com.example.MyPrivateDockerComponent": {
"componentVersion": "1.1.5",
"runWith": {}
}
},
"deploymentPolicies": {
"failureHandlingPolicy": "ROLLBACK",
"componentUpdatePolicy": {
"timeoutInSeconds": 60,
"action": "NOTIFY_COMPONENTS"
}
},
"iotJobConfiguration": {
"jobExecutionsRolloutConfig": {
"maximumPerMinute": 1000
}
},
"tags": {}
}
Can anyone tell me where to place the "logsUploaderConfiguration" that I can accordingly update my deployment to log to Cloudwatch? Also, is this somehow possible through the AWS console in addition to the CLI?
Thanks a lot for your help!