function isLifecycleSession(arn) {
    if (!arn) {
        return false;
    }

    const arnSplits = arn.split(':');
    const service = arnSplits[2];

    const resourceNames = arnSplits[arnSplits.length - 1].split('/');

    const resourceType = resourceNames[0];
    const sessionName = resourceNames[resourceNames.length - 1];

    return (service === 'sts'
        && resourceType === assumedRoleArnResourceType
        && sessionName === backbeatLifecycleSessionName);
}
isLifecycleSession - check if it is the Lifecycle assumed role session arn.
@param {string} arn - Amazon resource name - example:
arn:aws:sts::257038443293:assumed-role/rolename/backbeat-lifecycle
@return {boolean} true if Lifecycle assumed role session arn, false if not.