[Django]-How to create a signed cloudfront URL with Python?

3👍

Omit the private_key_string:

my_signed_url = my_distro.create_signed_url(OBJECT_URL, KEYPAIR_ID,
        expire_time=time.time() + SECS, private_key_file=KEYPAIR_FILE)

That parameter is used to pass the actual contents of the private key file, as a string. The comments in the source explain that only one of private_key_file or private_key_string should be passed.

You can also omit all the kwargs which are set to None, since None is the default.

Leave a comment