Configure session timeouts for Amazon IoT SiteWise Edge
SiteWise Edge allows you to configure session timeouts for the SiteWise Edge API. This feature enhances security by automatically terminating inactive sessions after a specified time-period. This section guides you through the process of configuring the session timeout using the Amazon IoT SiteWise console.
Note
Session timeout configuration is available for version 3.4.0 and later of the
aws.iot.SiteWiseEdgeProcessor
component. For more information,
see Amazon IoT SiteWise processor in the
Amazon IoT Greengrass Version 2 Developer Guide.
To configure a session timeout for a SiteWise Edge gateway
-
Navigate to the Amazon IoT SiteWise console
. -
In the navigation pane, choose Edge gateways.
-
Choose the SiteWise Edge gateway where you want to configure the session timeout.
Note
You can configure the session timeout on the Amazon IoT Greengrass V2 deployment type.
-
In the Gateway configuration section, choose the associated Greengrass core device.
-
In the Deployments tab, under Greengrass devices, select the appropriate deployment link.
-
Under Actions choose Revise. Read the warning, and then choose Revise deployment.
Important
Creating a revised session timeout configuration replaces the device's current configuration.
-
In Step 1, Specify target, provide an optional Name to identify the revised deployment, and then choose Next.
-
In Step 2, Select components - optional, you can leave all current selections as-is and choose Next.
-
In Step 3, Configure components - optional, select aws.iot.SiteWiseEdgeProcessor, and choose Configure component.
-
In the Configuration update section, under Configuration to merge, enter the following JSON:
{ "AWS_SITEWISE_EDGE_SESSION_TIMEOUT_MINUTES": "240" }
-
Set the value for
AWS_SITEWISE_EDGE_SESSION_TIMEOUT_MINUTES
in minutes. Session timeout values can be from 1 minute to 10080 minutes (7 days). The default value is 240 minutes (4 hours). -
Choose Confirm.
-
Choose Next to proceed through remaining steps until you arrive at Step 5, Review.
-
Review your configuration changes, then choose Deploy to apply the changes to your SiteWise Edge gateway.
Note
Alternatively, you can configure the session timeout by setting the global environmental variable AWS_SITEWISE_EDGE_SESSION_TIMEOUT_MINUTES to your desired value (in minutes) on your SiteWise Edge gateway.
After the deployment is complete, the new session timeout configuration is applied to your SiteWise Edge API.