Skip to content

Instantly share code, notes, and snippets.

@GeoffreyPlitt
Created October 14, 2014 20:56
Show Gist options
  • Save GeoffreyPlitt/be3601dce8cb740c960a to your computer and use it in GitHub Desktop.
Save GeoffreyPlitt/be3601dce8cb740c960a to your computer and use it in GitHub Desktop.
Use Python/Boto to upload SSL cert to Amazon CloudFront
from boto import connect_iam
iam_conn = connect_iam()
_dir = '/some/folder/'
cert_name = 'wildcard'
cert_chain = open(_dir + 'gd_bundle-g2-g1.crt').read()
cert_body = open(_dir + 'mysite.crt').read()
private_key = open(_dir + 'mysite.com.key').read()
path = '/cloudfront/'
print iam_conn.upload_server_cert(cert_name, cert_body, private_key, cert_chain, path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment