Cloudfront limited time (signed) URL using Java AWS SDK

amazon-cloudfront, amazon-web-services, java

Solution

FYI - This blog explains how it is done in Java... very simple.

java.awsblog.com/post/Tx1VE22EWFR4H86/Accessing-Private-Content-in-Amazon-CloudFront

Problem

How do I create cloudfront signed URL using AWS SDK? This really seems like it should be easy to do, but I just fail to see it. I generally understand how it works and could probably throw together plain Java code to do it myself. It seems weird that AWS SDK does not provide a method for this. - Earlier question but with C#: cloudfront private time limited url. - This link explains in theory how such cloudfront urls are generated, but without code examples - This link explains how it is done with Java, but it apparently uses JetS3t library instead of AWS SDK. at least I have been unable to locate the used CloudFrontService class in AWS SDK Javadoc - This link demonstrates how it is done for S3 using AWS SDK - This blog post I found referenced in another related question contains source code for a java class CloudFrontSecurityProvider to do the signing and it is not very complicated.

Original source

Related problems