[PYTHON] # 1 Until you deploy Django's web application (instance construction with EC2 on AWS)

Introduction

I am a beginner in programming languages. Therefore, I think there are some misreading and lack of understanding. In that case, I would appreciate it if you could let me know in the comments.

The "goal" wants to go as far as deploying a pre-created Python web application. I will write for beginners as much as possible.

Creation procedure

How to create an instance

Step 1 (Create Instance)

Select EC2 on AWS and go to this screen. Click where the arrow is at the top right of the screen. (This is where you select a region.)

Step 2 (Select Amazon Machine Image)

Clicking "Create Instance" will take you to this screen. Decide on a virtual server here. This time, we will use Ubuntu Server 18.04 LTS (HVM), SSD Volume Type-ami-0bcc094591f354be2 (64-bit x86) / ami-0bc556e0c71e1b467 (64-bit Arm). ステップ1マシンイメージ.png

Step 3 (select instance type)

Select "t2.micro free usage tier target" as the instance type

Step 4 (Storage settings)

Click the "Next" button without thinking about "Step 7: Confirmation of instance creation".

Step 5 (Create key pair + Download)

Click "Launch" on the "Step 7: Confirm Instance Creation" page. Then, this screen will appear, so select "Create new key pair". Please use any name you like for the "key pair name".

Step 6 (Try SSH communication)

Make sure the key pair has been downloaded. After that, it is assumed that you have moved to Desktop. I think the key pair is downloaded as a file called XXX.pem, but I can't SSH into this file without changing the permissions with the chmod command.

*'Hostname', but the public DNS in the instance description: xxx.amazonaws.com. *'XXX' in XXX.pem will be the "key pair name" determined in step 5.

For permissions, type the code below.
$ chmod 400 XXX.pem

Check if you can connect with SSH.
$ ssh -i XXX.pem 'user name'@'hostname'

In this article:
$ ssh -i test.pem [email protected]

You will be asked (yes / no) in the terminal, so type yes. Then You should be prompted with ubuntu @ ip-000-00-00-000: ~ $.

I will write the continuation in the next article.

Recommended Posts

# 1 Until you deploy Django's web application (instance construction with EC2 on AWS)
Until you publish (deploy) a web application made with bottle on Heroku
Until you publish your Django application (+ MySQL) on AWS EC2 (+ RDS (+ S3))
Deploy a Django application on EC2 with Nginx + Gunicorn + Supervisor
ruby environment construction with aws EC2
Build a Flask / Bottle-like web application on AWS Lambda with Chalice
Launched a web application on AWS with django and changed jobs
Prepare the environment of Chainer on EC2 spot instance with AWS Lambda
Try Tensorflow with a GPU instance on AWS
Until you use PhantomJS with Python on Heroku
Until the web application is released on Sakura VPS
# 2 Build a Python environment on AWS EC2 instance (ubuntu18.04)
Deploy Python3 function with Serverless Framework on AWS Lambda
Web application made with Python3.4 + Django (Part.1 Environment construction)
Execute python3 system with PHP exec () on AWS EC2
[GitHub] Until you pull with ssh using Deploy keys
[AWS] Install node.js on EC2 instance and execute sample program
read the tag assigned to you on ec2 with boto3
(Failure) Deploy a web app made with Flask on heroku
[AWS EC2] Settings you want to do on Amazon Linux 2
Web application creation with Django
Web application with Python + Flask ② ③
Web application with Python + Flask ④
If you know Python, you can make a web application with Django
Web application created with Python + Flask (using VScode) # 1-Virtual environment construction-
xgboost (python) on EC2 Spot instance environment prepared by AWS Lambda
# 3 Build a Python (Django) environment on AWS EC2 instance (ubuntu18.04) part2
Create an AWS Cloud9 development environment on your Amazon EC2 instance
How to deploy a web application on Alibaba Cloud as a freelancer