Symptoms of this issue
First of all, some of the js, css, images will be lost when using https as the protocol to visit the website.
If http authentication is used or the grammatically log-in code, like drupal_form_submit('user_login', $form_state);, is used, the user logged-in session, which is in the global $user variable , might be missing in other modules.
Reason of this issue
ELB will terminate the https which will make $_SERVER['HTTPS'] disabled even if we are doing a https request. However, ELB sets another variable $_SERVER['HTTP_X_FORWARDED_PROTO'] to https which we can use to define the right protocol.
Solution of this issue
Go in drupal root folder and open the file named includes/bootstrap.inc.
Go to line 735 and the line with the code of $is_https = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on'; should be found.
Add the code below after the code of line 735:
//to make it compatible with AWS ELB
$is_https = $is_https ? $is_https :
isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https';
Here we are, drupal should work well with AWS ELB for https protocol.