Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7701441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:59:11+00:00 2026-05-31T22:59:11+00:00

I am trying to setup secure streaming with amazon s3 and cloudfront. I have

  • 0

I am trying to setup secure streaming with amazon s3 and cloudfront. I have done the following steps and I always get an error saying

“stream not found”.

  1. Setup s3 bucket and uploaded mp3 file(file.mp3) for testing.
  2. Created origin access policy in cloudfront, got Id and S3 canonicle Used Id.
  3. Given S3 canonicle User Id read permissions to s3 bucket. (For testing I have given read permission to everyone as well.)
  4. Created RSA public/private key for cloudfront.
  5. Created Streaming distribution in cloudfront with previous s3 bucket as origin and Trusted Signer as self. Result of this request shows self trusted signer with public key Id.
  6. Generated signed url using private key.
  7. Created html file to show this mp3 using jwplayer.

Below is the code I used to create origin signed url

    Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
    String distributionDomain = "sbngg4fbfkiq2.cloudfront.net";
    String privateKeyFilePath = "src/s3access/pk-APKAJRHSQBGT5CW7P2CA.der";
    String s3ObjectKey = "file.mp3";
    // Convert your DER file into a byte array.
    byte[] derPrivateKey = ServiceUtils.readInputStreamToBytes(new
            FileInputStream(privateKeyFilePath));
    String signedUrlCanned = CloudFrontService.signUrlCanned(
       s3ObjectKey, // Resource URL or Path
        "APKAJRHSQBGT5CW7P2CA.",     // Certificate identifier, 
                       // an active trusted signer for the distribution
        derPrivateKey, // DER Private key data
        new Date(112,3,29) // DateLessThan
        );
    System.out.println(signedUrlCanned);

This gives signed url. Then I have used following html file.

<html><head>
<script type='text/javascript' src='jwplayer.js'></script>
</head><body>
<div id="container">Loading the player ...</div>

<script type="text/javascript">

  jwplayer('container').setup({
    'id': 'playerID',
    'width': '352',
    'height': '240',
'provider': 'rtmp',
    'streamer': 'rtmp://sbngg4fbfkiq2.cloudfront.net/cfx/st',
    'file': 
    'file.mp3?Expires=1335637800&Signature=asSUSIbGYZP9IXnmjWIKgXMP2DCCA1B-x0mQtsQbUBFWdbKzlU~NnId8VH8T5ww8I1nbZKHWoLpGr679~QoDSMScKpVxVbyYVjQ0kn-JejzSkM6~ZEC6r8nArEdrT9R-M6EjR~IBkuPD-0qW2OUk1MBC4oiNeytIolG6IrSTGOU_&Key-Pair-Id=APKAJRHSQBGT5CW7P2CA',
'modes': [
    {
        type: 'flash', src: 'player.swf'
    } 
]
 });

</script>

</body>
</html>

It displays video frame. Clicking on play button tried to load stream but after couple of seconds it says

 Stream not foundfile.mp3?Expires=1335637800&Signature=asSUSIbGYZP9IXnmjWIKgXMP2DCCA1B-x0mQtsQbUBFWdbKzlU~NnId8VH8T5ww8I1nbZKHWoLpGr679~QoDSMScKpVxVbyYVjQ0kn-JejzSkM6~ZEC6r8nArEdrT9R-M6EjR~IBkuPD-0qW2OUk1MBC4oiNeytIolG6IrSTGOU_&Key-Pair-Id=APKAJRHSQBGT5CW7P2CA

Please help me to setup this. Let me know if I am missing something.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:59:12+00:00Added an answer on May 31, 2026 at 10:59 pm

    I got it working with same setup I mentioned above, but few cases

    1. It is not working for mp3 files (checked with one file I have uploaded) but works for mp4 videos.
    2. Suppose I generated signed link for the file which is not present and tried to load video. Ofcourse I will get error. After this even I upload the file with same name, still I continue to get the error.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to setup secure socket communication to a server. I have successfully
Trying to setup a rails app and getting following error. Any ideas? b/tasks instead.
I'm trying setup a subset of boost and get it properly compiled using bjam,
We have a commerce site we're attempting to get 3D Secure (Verified by VISA/Mastercard
I am trying to setup SSL to my web app and followed tutorial (http://techtracer.com/2007/09/12/setting-up-ssl-on-tomcat-in-3-easy-steps/),
Trying to setup an SSH server on Windows Server 2003. What are some good
Trying to setup a CodeIgniter based project for local development (LAMP stack), and once
After trying to setup my site for Google Webmaster Tools I found that my
I'm trying to setup CruiseControl.net at the moment. So far it works nice, but
I'm trying to setup an Apache/PHP/Postgresql server locally on my machine. I'm using Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.