The Amazon CloudFront Authentication Tool for Curl, cfcurl.pl is used to interface with the Amazon CloudFront service.

cfcurl.pl requires Perl 5.8.0 or greater, curl 7.16.2 or greater, the following Perl modules:

  • Digest::HMAC_SHA1
  • FindBin
  • MIME::Base64
  • Getopt::Long
  • File::Temp
  • File::Basename
  • Fcntl

This tool does not require environment variables to be set, but it does use the file ~/.aws-secrets to store AWS credentials. To setup the ~/.aws-secrets file, see HowTo: Install AWS CLI - Security Credentials.

Install Script

If you’re running Linux, this script will do everything this article covers: install_cfcurl.sh from our aws_scripts collection. Be sure to run it as root or use sudo.

Git Repository

Checkout the repository. This only needs to be done once throughout this series of articles.

Console - user@hostname ~ $

1
git clone https://bitbucket.org/dowdandassociates/aws_scripts.git

Run install script

Console - user@hostname ~ $

1
sudo aws_scripts/install_aws_cli/install_cfcurl.sh

Direct Download of Script

Console - user@hostname ~ $

1
curl -L https://bitbucket.org/dowdandassociates/aws_scripts/raw/master/install_aws_cli/install_cfcurl.sh | sudo bash

Install Process

Download the file.

Console - root@hostname ~ #

1
2
3
curl --silent \
--output /usr/local/bin/cfcurl.pl \
http://d1nqj4pxyrfw2.cloudfront.net/cfcurl.pl

Set cfcurl.pl to be able to execute.

Console - root@hostname ~ #

1
chmod 755 /usr/local/bin/cfcurl.pl

References

Parts in this series