This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Relatório Final — Desafio 01 | |
| **Gerenciamento de EC2 e S3 via AWS CLI com Role Temporária e Agente de IA** | |
| Data: 23/03/2026 | |
| Autora: Livia | |
| --- | |
| ## 1. Objetivo do Desafio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| NOME=${1:-bia-zonab} | |
| NOME_RDS=$2 | |
| SCRIPT_DIR=$(dirname $0) | |
| INSTANCE_ID=$(aws ec2 describe-instances \ | |
| --filter "Name=tag:Name,Values=$NOME" "Name=instance-state-name,Values=running,stopped" \ | |
| --query 'Reservations[0].Instances[0].InstanceId' \ | |
| --output text --profile fundamentos) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| NOME=${1:-bia-zonab} | |
| # Mata processos de túnel | |
| echo "Encerrando túneis ativos..." | |
| pkill -f "aws ssm start-session" || true | |
| INSTANCE_ID=$(aws ec2 describe-instances \ | |
| --filter "Name=tag:Name,Values=$NOME" "Name=instance-state-name,Values=running" \ | |
| --query 'Reservations[0].Instances[0].InstanceId' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| # --- Configurações --- | |
| API_HOM="http://54.144.81.161" | |
| BUCKET_HOM="desafio-fundamentos" | |
| START_TIME=$(date +%s) | |
| # Importa as funções (certifique-se que os arquivos estão no mesmo diretório) | |
| source ./react.sh |