.ebextensions/02_certbot.config
packages:
yum:
augeas: []
Resources:
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
FromPort: 443
CidrIp: 0.0.0.0/0
container_commands:
01_ensure_no_old_certbot:
command: "yum remove certbot"
02_make_certbot_venv:
command: "python3 -m venv /opt/certbot/ && /opt/certbot/bin/pip install --upgrade pip"
03_install_certbot:
command: "/opt/certbot/bin/pip install certbot certbot-nginx"
04_link_certbot:
command: "ln -sf /opt/certbot/bin/certbot /usr/bin/certbot"
05_autorenew:
command: "chmod u+x /var/app/staging/.ebextensions/autorenew.sh && /var/app/staging/.ebextensions/autorenew.sh"
06_make_cert_script_executable:
command: "chmod +x .platform/hooks/postdeploy/00_get_cert.sh"