# Introdução

Este projeto tem por objetivo , com demonstração prática, compartilhar o fluxo de criação de conta na AWS bem como a utilização do AWS CLI pela linha de comando no terminal, com o intuito de provisionar uma instância virtual no EC2 e acessá-la através de SSH.

Resumo do código para os mais ansiosos :point\_down: *Para os pacientes, pode seguir para a próxima página.*

```bash
aws configure --profile personal

aws --profile personal ec2 \
    create-key-pair \
    --key-name aws-ssh-key \
    --key-type ed25519 | \
    jq -r '.KeyMaterial' > ~/.ssh/aws-ssh-key.pem

aws --profile personal ec2 \
    create-security-group \
    --group-name instances-sg \
    --description "Security Group for EC2 instances" \
    --tag-specifications "ResourceType=security-group,Tags=[{Key=Name,Value=instances-sg}]" | \
    jq -r '.GroupId'

aws --profile personal ec2 \
    authorize-security-group-ingress \
    --group-id <sg-group-id> \
    --protocol tcp --port 22 --cidr 0.0.0.0/0

aws --profile personal ec2 \
    run-instances --image-id ami-0c4f7023847b90238 \
    --instance-type t2.micro \
    --key-name aws-ssh-key \
    --security-group-ids <sg-group-id> \
    --associate-public-ip-address \
    --tag-specifications "ResourceType=instance,Tags=[{Key=Name,Value=myapp}]" \
    --count 1 | \
    jq -r '.Instances[0].InstanceId'

chmod 400 ~/.ssh/aws-ssh-key.pem

ssh ubuntu@<public-ip> -i ~/.ssh/aws-ssh-key.pem
```


---

# Agent Instructions: 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:

```
GET https://aws101.leandronsp.com/introducao.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
