1

So I am trying to use a python program called awslogs to query different log streams. When I call

sudo awslogs get /aws/lambda/<my lambda> Process ALL --start='5 day'

I get a warning

SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

After reading online and from the error itself the solution is to upgrade my python. My Python version is 2.7.6.

So I tried upgrading python with these commands.

sudo add-apt-repository ppa:jonathonf/python-2.7

sudo apt-get update

sudo apt-get install python2.7

python --version

However when I run

sudo add-apt-repository ppa:jonathonf/python-2.7

I get this error message

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 11, in <module>
    from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

I was not able to resolve this issue with what I found online so I am posting this here.

output from readlink -f /usr/bin/python3

/usr/bin/python3.6
SPD
  • 111
  • 3

0 Answers0