title: rtmp live streaming cloudfront
body: <p>I am running <code>nginx rtmp module</code> on an ec2-instance and also, have mounted s3 with the help of <code>goofys(/var/mounted-s3-dir)</code> on the ec2-instance.</p>
  
  <p>Below is the nginx config of my server.</p>
  
  <pre><code>rtmp {
      server {
          listen 1935;
  
          application live {
              live on;
              hls on;
              hls_path /var/mounted-s3-dir;
          }
      }
  }
  </code></pre>
  
  <p>I am able to play the hls stream through s3 via cloudfront. I want to push the rtmp stream to s3 and play rtmp stream via cloudfront. It has higher latency. I want to reduce the latency by 2-3 seconds using rtmp cloudfront. Could you assist me to achieve this.</p>