Amazon CloudFront Authentication Tool for Curl

Developer Tools>Amazon CloudFront Authentication Tool for Curl
Community Contributed Software

  • Amazon Web Services provides links to these packages as a convenience for our customers, but software not authored by an "@AWS" account has not been reviewed or screened by AWS.
  • Please review this software to ensure it meets your needs before using it.

With the launch of the new API, the previous cfcurl.pl cannot be used due to the new signing scheme. cfcurlv4.pl calculates the proper Amazon CloudFront authentication signature V4, then calls Curl with the appropriate arguments.

Details

Submitted By: Matt@AWS
AWS Products Used: Amazon CloudFront, Amazon S3
Language(s): Perl
License: Apache License 2.0
Created On: June 20, 2013 11:13 PM GMT
Last Updated: June 20, 2013 11:13 PM GMT
Download

About This Sample

  • Cfcurlv4.pl helps developers to list/create/edit cloudfront distributions.
  • Cfcurlv4.pl calculates the proper Amazon CloudFront authentication signature V4, then calls Curl with the appropriate arguments.
  • If you are using API version older than 2013-05-12, use cfcurl.pl

Prerequisites

  • You must be signed up to use Amazon S3 and Amazon CloudFront. You can sign up for Amazon S3 at http://aws.amazon.com/s3/ and Amazon CloudFront at http://aws.amazon.com/cloudfront/.
  • This sample was built using Perl 5.8.0.
  • The following Perl modules, which you can download from CPAN:
    • Digest::HMAC_SHA1
    • FindBin
    • MIME::Base64
    • Getopt::Long
    • File::Temp
    • File::Basename
    • Fcntl
    • Readonly
  • This sample requires version 7.16.2 or newer of Curl.

Running the Sample

  • Run the sample using a command-line interface. For example:
    cfcurlv4.pl --keyname [friendly-key-name] --url [http-url] --action [GET | POST | PUT ]
  • Just running the cfcurlv4.pl without any command-line arguments will print the usage information.

Resources

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved.