Last active
November 16, 2017 20:28
-
-
Save ksnabb/008e7d38d0a520bbb85bcb6315013fa5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
domain_certificate = stack.add_resource( | |
Certificate( | |
'ApiCertificate', | |
DomainName=f'{subdomain}.{domain}' | |
) | |
) | |
elb = stack.add_resource(LoadBalancer( | |
'ELB', | |
LoadBalancerName='ELB', | |
Listeners=[ | |
Listener( | |
InstancePort=8080, | |
InstanceProtocol='HTTP', | |
Protocol='HTTPS', | |
LoadBalancerPort=443, | |
SSLCertificateId=Ref(domain_certificate) | |
) | |
], | |
HealthCheck=HealthCheck( | |
HealthyThreshold=2, | |
Interval=30, | |
Target='HTTP:8080/health', | |
Timeout=10, | |
UnhealthyThreshold=5 | |
), | |
SecurityGroups=[Ref(load_balancer_security_group)], | |
Subnets=[Ref(public_subnet1), Ref(public_subnet2)] | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment