Install Python 3 on an AWS EC2 instance?

Error: No package python3 available.

sudo yum install python3 -y
Loaded plugins: priorities, update-motd, upgrade-helper
No package python3 available.
Error: Nothing to do

If you get above error, try this commend to Install Python 3 on an AWS EC2 instance

~$ sudo yum list | grep phython3
~$ sudo yum install python34
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
–> Running transaction check
—> Package python34.x86_64 0:3.4.10-1.45.amzn1 will be installed
–> Processing Dependency: python34-libs(x86-64) = 3.4.10-1.45.amzn1 for package: python34-3.4.10-1.45.amzn1.x86_64
–> Processing Dependency: for package: python34-3.4.10-1.45.amzn1.x86_64
–> Running transaction check
—> Package python34-libs.x86_64 0:3.4.10-1.45.amzn1 will be installed
–> Finished Dependency Resolution

How to Connect AWS Server from Desktop

Enhanced terminal for Windows with X11 server, tabbed SSH client, network tools and much more

MobaXterm tabbed terminal

From this console window, you will be allowed to run the Unix commands you need: ls, cd, grep, awk, tail, cut, sed, wget, rsync, telnet, ssh, rlogin, rsh … All the essential Unix tools are present. If you need a program that is not available in the basic MobaXterm file, you can download the free plugins.

MobaXterm tabbed terminal

Sessions management

MobaXterm allows you to launch remote sessions. You can choose to create SSH, Telnet, Rlogin, RDP, VNC, XDMCP, FTP, SFTP or Serial sessions. Every session you start is automatically saved and displayed in the left sidebar.

Sessions manager

Graphical SFTP browser

When you log to a remote server using SSH, a graphical SFTP browser pops up on in the left sidebar. It allows you to drag and drop files directly from/to the remote server using a secure SFTP connection.

Graphical SFTP browser

A single instance application on an EC2 in AWS to Convert the application to operate on multiple servers

You run a single instance application on an EC2 instance in AWS. your architecture reams are looking to make changes and convert the application to operate on multiple servers. The app runs on Linux and currently access millions of flat file data file in the /data/… folder structure.

This database is stored on an EBS volume attached to the EC2 instance. How can this be moved to work on multiple servers with as little application changes as possible? What product would you suggest?


Answer: EFS

For this use-case, you should start looking at the new Amazon Elastic File System (EFS), which is designed to be multiply attached in exactly the way you are wanting. The key difference between EFS and EBS is that they provide different abstractions: EFS exposes the NFSv4 protocol, whereas EBS provides raw block IO access.


When should you use Lambda over EC2?

– Changes to Amazon S3 Buckets
– Updates to an Amazon DynamoDb tables
– Custom events generated bu your application or devices
– Kinesis Streams

Create a Custom AMI in AWS

Launch a Configuration Instance

Launch an instance from a Base AWS Linux AMI:

  • Login to the Management Console
  • Launch EC2 instance using AWS Linux AMI:
    • t2.micro
    • Public IP
    • Create a Security Group with SSH an HTTP access
    • Download a Key Pair

Install Apache and PHP

SSH to the instance and execute the following commands to install Apache and PHP:

  • sudo yum update -y
  • sudo yum install -y httpd24 php70
  • sudo service httpd start
  • sudo chkconfig httpd on

Create a PHP page with the following commands:

  • sudo usermod -a -G apache ec2-user
  • sudo chown -R ec2-user:apache /var/www
  • echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php

Create a Custom AMI

In the EC2 Management Console, create an image from the config instance:

  • Select the instance in the console
  • Under the Actions menu, choose Create Image:
    • Name the Image





  • Launch an instance from the new Image


Want to pass AWS Certified Solutions Architect – Associate Level?  Check out training