My Django app is deployed and working thanks to this fantastic article: https://medium.com/@justaboutcloud/how-to-deploy-a-django3-application-on-elastic-beanstalk-python3-7-and-amazon-linux-2-bd9b8447b55
I'm to the end of the project and am setting up HTTPS. To do that, I've created a config file in my .ebextensions folder called 02_https.config
In this file, I copy and pasted the code from the article:
option_settings:
aws:elbv2:listener:443:
SSLCertificateArns: <YourACMCertificateARN>
Protocol: HTTPS
Resources:
AWSEBV2LoadBalancerListener:
Type: 'AWS::ElasticLoadBalancingV2::Listener'
Properties:
LoadBalancerArn: { "Ref" : "AWSEBV2LoadBalancer" }
DefaultActions:
- RedirectConfig:
Port: 443
Protocol: HTTPS
StatusCode: HTTP_301
Type: redirect
Port: 80
Protocol: HTTP
When I deploy the app, I get this error message:
Service:AmazonCloudFormation, Message:Template format error: Unresolved resource dependencies [AWSEBV2LoadBalancer] in the Resources block of the template
I have two theories:
I'm not pasting the ARN Certificate in the correct format, which is throwing off my YAML formatting
There is something wrong about this code's formatting.
Could someone please provide some input?
elb
instead of the new application oneelbv2
– Finder