Session problems generally appear for one of a few reasons:
1. A change in cookie paths and/or domains creates a conflict. This would often cause the logout issues. The easiest way around this is to change the cookie prefix.
2. Sessions are being stored in a cache and are being evicted. This is very common with APC. We don't recommend storing sessions in APC. In general, we don't recommend using APC as a data cache; we prefer Memcache.
3. The IP address is changing from page view to page view. This could be a user issue, but it wouldn't change based on your server. However, this will often happen because there is a reverse proxy system in place. Commonly, this is something like CloudFlare, but I'm not sure if AWS has something similar. If this is the case, the IP being seen by XenForo (and your server) is that of the proxy, not the original user. Ideally, you want to fix this at the web server level so that your logs reflect the user IP. However, you can fix it with a hack in config.php which pulls the IP in from a different HTTP header (usually HTTP_X_FORWARDED_FOR).