(aws-ecs-patterns) ALB pattern sets protocol/port to HTTP/80 when attaching certificate
See original GitHub issuewhen attaching the certificate to ApplicationLoadBalancedEc2Service or ApplicationLoadBalancedFargateService target group is not changing to HTTPS and 8443 Target group , port and protocol is defaulted to HTTP and 80
export interface ApplicationLoadBalancedServiceBaseProps {
...
const `**targetProps**` = {
port: 80
};
if (props.certificate !== undefined && props.protocol !== undefined && props.protocol !== ApplicationProtocol.HTTPS) {
throw new Error('The HTTPS protocol must be used when a certificate is given');
}
const protocol = props.protocol !== undefined ? props.protocol : (props.certificate ? ApplicationProtocol.HTTPS : ApplicationProtocol.HTTP);
this.listener = this.loadBalancer.addListener('PublicListener', {
protocol,
open: true
});
this.targetGroup = this.listener.addTargets('ECS', **targetProps**);
Its a problem when your docker application is running on 8443 there should be a way in the “ApplicationLoadBalancedServiceBase” class to override the port .
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:16 (5 by maintainers)
Top Results From Across the Web
aws-cdk/aws-ecs-patterns module - AWS Documentation
If you need to encrypt the traffic between the load balancer and the ECS tasks, you can set the targetProtocol to HTTPS ....
Read more >AWS Load Balancer HTTPS Setup with Route 53 ... - YouTube
In this video we will set up Load Balancer for HTTPS traffic with AWS Certificate Manager, and Route 53. We will also learn...
Read more >AWS EKS Kubernetes ALB Ingress Service Enable SSL
Implement SSL with ALB Ingress Service on AWS EKS. ... are going to create a SSL certificate; Add Annotations related to SSL Certificate...
Read more >Top 5 @aws-cdk/aws-ecs-patterns Code Examples - Snyk
Learn more about how to use @aws-cdk/aws-ecs-patterns, ... fromEcrRepository(imageRepo, tag) // Lookup pre-existing TLS certificate const certificateArn ...
Read more >Unable to attach ACM Public certificate with ALB Listener ...
I have fixed this issue, after getting ACM cert, you have to validate after some wait time. you can use following code snippet:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Have the same problem. that the container port override the Targetgroup port is understandable. But it still tries HTTP on a HTTPS container port. are there any workarounds ?
@nickorka, protocol: ApplicationProtocol.HTTPS, where ApplicationProtocol comes from @aws-cdk/aws-elasticloadbalancingv2