Skip to content

Instantly share code, notes, and snippets.

View b-b3rn4rd's full-sized avatar

Bernard Baltrusaitis b-b3rn4rd

  • Bendigo Bank
  • Melbourne
View GitHub Profile
@b-b3rn4rd
b-b3rn4rd / hook-dns-01-lets-encrypt-route53.py
Created October 12, 2016 00:06
Python 3 script to use as a hook for the letsencrypt.sh client
#!/usr/bin/env python3
# How to use:
#
# LE_HOSTED_ZONE=XXXXXX LE_AWS_PROFILE=dns-access ./letsencrypt.sh --cron --domain example.org --challenge dns-01 --hook /tmp/hook-dns-01-lets-encrypt-route53.py
#
# More info about letsencrypt.sh: https://github.com/lukas2511/letsencrypt.sh/wiki/Examples-for-DNS-01-hooks
# Using AWS Profiles: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-multiple-profiles
# Obtaining your Hosted Zone ID from Route 53: http://docs.aws.amazon.com/cli/latest/reference/route53/list-hosted-zones-by-name.html
<?php
namespace Acme\DemoBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Role\SwitchUserRole;