1

I am attempting to deploy a Flask app to AWS Elastic Beanstalk (single EC2 instance) with HTTPS enabled. I successfully deployed a version of my app without HTTPS, but then I followed this tutorial to terminate HTTPS:

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/https-singleinstance-python.html

Following the documentation, I created a .ebextensions/https-instance.config file with the template code they provide (truncated here):

packages:
  yum:
    mod24_ssl : []

files:
  /etc/httpd/conf.d/ssl.conf:
    mode: "000644"
    owner: root
... CERTIFICATES etc. etc. ...

Uploading this with my code, the deployment failed. Checking through the logs, the error was in the first part of the config file when yum attempts to install mod24_ssl:

No package mod24_ssl available

From my research (including here https://forums.aws.amazon.com/thread.jspa?threadID=222977), it seems that I may want to try installing a different package? I've attempted to replace mod24_ssl with mod_ssl orhttpd24-mod_ssl, but both return the same error (with their respective packages "not available").

Help much appreciated! Thanks.

whoopscheckmate
  • 746
  • 8
  • 23

1 Answers1

1

Please double check your settings. The mod24_ssl is only for Amazon Linux 1. The package name for Amazon Linux 2 is mod_ssl. Maybe you misspell it and use modssl instead?

Amazon Linux 1 (mod24_ssl)

yum info mod24_ssl

Loaded plugins: priorities, update-motd, upgrade-helper
Available Packages
Name        : mod24_ssl
Arch        : x86_64
Epoch       : 1
Version     : 2.4.43
Release     : 1.89.amzn1
Size        : 122 k
Repo        : amzn-updates/latest
Summary     : SSL/TLS module for the Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The mod_ssl module provides strong cryptography for the Apache Web
            : server via the Secure Sockets Layer (SSL) and Transport Layer
            : Security (TLS) protocols.

Amazon Linux 2 (mod_ssl)

yum info mod_ssl

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Available Packages
Name        : mod_ssl
Arch        : x86_64
Epoch       : 1
Version     : 2.4.43
Release     : 1.amzn2
Size        : 115 k
Repo        : amzn2-core/2/x86_64
Summary     : SSL/TLS module for the Apache HTTP Server
URL         : https://httpd.apache.org/
License     : ASL 2.0
Description : The mod_ssl module provides strong cryptography for the Apache Web
            : server via the Secure Sockets Layer (SSL) and Transport Layer
            : Security (TLS) protocols.

Marcin
  • 215,873
  • 14
  • 235
  • 294