> For the complete documentation index, see [llms.txt](https://task-devops.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://task-devops.gitbook.io/documentation/amazon-web-services.md).

# Amazon Web Services

## Launch an EC2 instance

To process our task, we shall start  a micro EC2 instance in AWS console

To start the instance, we go to Console -> Services -> Compute -> EC2 and we click on **"Launch Instance".** We select **Ubuntu Server 16.04 LTS (HVM), SSD Volume Type,** choose a micro instance  and follow next steps.

We also set a security groups in order to accept requests from the web on port 80 (HTTP) and port 443 (HTTPS). After creation, the instance characteristics are :

{% hint style="warning" %}
Each time an EC2 instance restart, it changes public address IP. This can lead to problems with DNS service when a domain name is set to the old IP.

The best thing is to assign to our EC2 an elastic IP address. More information on elastic IP on <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>
{% endhint %}

{% hint style="success" %}
We create and assign an elastic IP to our EC2 which is **54.201.220.59**
{% endhint %}

|                   |                                                   |
| ----------------- | ------------------------------------------------- |
| Storage size      | 8 GiB                                             |
| Public DNS        | ec2-54-201-220-59.us-west-2.compute.amazonaws.com |
| Public IP IPv4    | 54.201.220.59                                     |
| Key .pem filename | **Task\_devops.pem**                              |

### Security groups

#### Inbound rules

| Port    | Protocol | Source          |
| ------- | -------- | --------------- |
| **80**  | tcp      | 0.0.0.0/0, ::/0 |
| **22**  | tcp      | 0.0.0.0/0       |
| **443** | tcp      | 0.0.0.0/0, ::/0 |

#### Outbound rules

| Port    | Protocol | Source    |
| ------- | -------- | --------- |
| **All** | All      | 0.0.0.0/0 |

### Connect to the instance

We can connect to the newly created instance from a Linux based command line interface by using the generated key .pem file  ( We are using an Ubuntu 14.04 LTS Laptop)

```bash
$ sudo ssh -i Task_devops.pem ubuntu@54.201.220.59
```

## Assigning a domain name to the server

Each created EC2 instance has a given public DNS which is not often pratical to use (Very long and not easy to remember) In order to have an easy to remember one, we shall assign to the server a small and specific domain name.

{% hint style="info" %}
For the purpose of this task, we shall use a subdomain of domain name woezzon.com as : [task.woezzon.com](https://task.woezzon.com)
{% endhint %}

### Amazon Route 53

To assign a domain name to the server instance, we shall use AWS network service [**Route 53**](https://aws.amazon.com/fr/route53/). Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service. It helps manage domain names and translate them to into numeric IP address.

In our case, we shall link the domain name **task.woezzon.com** to the server IP address 54.201.220.59

With Route 53, domain names are managed by creating Hosted zone for each domain. The hosted zone will contain all related subdomains informations and record set like Type A IP address, Mail Exchange server (MX) , Cananocial Name (CNAME), etc .. For details on how to assign a domain name to a server, refer to Route 53 documentation <https://docs.aws.amazon.com/route53/index.html#lang/en_us>

To be sure that the domain name points properly to the good IP address we can check in command line with the **dig** command :

```
$ dig task.woezzon.com
```

The output would show something like :

```
;; ANSWER SECTION:
task.woezzon.com.	300	IN	A	54.201.220.59
```

{% embed url="<https://aws.amazon.com/>" %}

{% embed url="<https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://task-devops.gitbook.io/documentation/amazon-web-services.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
