Code Examples for Creating a Signature for a Signed URL - Amazon CloudFront

Code Examples for Creating a Signature for a Signed URL

This section includes downloadable application examples that demonstrate how to create signatures for signed URLs. Examples are available in Perl, PHP, C#, and Java. You can use any of the examples to create signed URLs. The Perl script runs on Linux/Mac platforms. The PHP example will work on any server that runs PHP. The C# example uses the .NET Framework.

This post on a third-party blog shows an example of CloudFront signed cookies in Ruby: Using Cloudfront Signed Cookies.

This post on the AWS Developer Blog shows an example of CloudFront signed URLs in Node.js, using a third-party npm module called aws-cloudfront-sign: Creating Amazon CloudFront Signed URLs in Node.js

You can find example code for signed URLs and for signed cookies in a variety of programming languages. Do an internet search on sample app language cloudfront signed URLs or on sample app language cloudfront signed cookies.