tech:cloud_commande_aws
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |||
| tech:cloud_commande_aws [2025/11/13 20:20] – Jean-Baptiste | tech:cloud_commande_aws [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1 | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Commande aws | ||
| + | |||
| + | Voir : | ||
| + | * aws-shell | ||
| + | * cloud-utils | ||
| + | |||
| + | |||
| + | Voir : | ||
| + | * http:// | ||
| + | |||
| + | |||
| + | ** Le système doit être à l' | ||
| + | |||
| + | |||
| + | ## Installation | ||
| + | |||
| + | ~~~bash | ||
| + | pip install --user awscli | ||
| + | ~~~ | ||
| + | |||
| + | Générer `~/ | ||
| + | ~~~bash | ||
| + | aws configure --profile os1 | ||
| + | ~~~ | ||
| + | |||
| + | `~/ | ||
| + | ~~~ini | ||
| + | [profile os1] | ||
| + | region = eu-west-2 | ||
| + | output = text | ||
| + | ~~~ | ||
| + | |||
| + | `~/ | ||
| + | ~~~bash | ||
| + | alias aws=' | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Test | ||
| + | ~~~bash | ||
| + | aws s3 ls | ||
| + | aws ec2 describe-instances --output table | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Auto completion | ||
| + | |||
| + | https:// | ||
| + | |||
| + | ~~~bash | ||
| + | complete -C " | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Exemple | ||
| + | |||
| + | Forcer l' | ||
| + | ~~~bash | ||
| + | aws ec2 stop-instances --instance-ids i-39992709 --force | ||
| + | ~~~ | ||
| + | |||
| + | " | ||
| + | ~~~bash | ||
| + | aws ec2 terminate-instances --instance-ids i-39992709 | ||
| + | ~~~ | ||
| + | |||
| + | Rechercher par " | ||
| + | ~~~bash | ||
| + | aws ec2 describe-instances --filter Name=tag: | ||
| + | ~~~ | ||
| + | |||
| + | Plusieurs " | ||
| + | ~~~bash | ||
| + | aws ec2 modify-instance-attribute --instance-id i-fae31a89 --groups sg-8569c41e sg-b25eb0d1 | ||
| + | ~~~ | ||
| + | |||
| + | Get InstanceId from volume-id (attached) | ||
| + | ~~~bash | ||
| + | aws ec2 describe-volumes --filters Name=volume-id, | ||
| + | ~~~ | ||
| + | |||
| + | describe-images | ||
| + | ~~~bash | ||
| + | aws ec2 describe-images --owners self --output json | jq ' | ||
| + | |||
| + | aws ec2 describe-images --owners 679593333241 --filters ' | ||
| + | |||
| + | aws ec2 describe-images --owners=self --filters ' | ||
| + | aws ec2 deregister-image --image-id ami-00f406c198ce29c37 | ||
| + | |||
| + | aws ec2 describe-instances --filters ' | ||
| + | aws ec2 describe-images --image-ids ami-01f3682deed220c2a | ||
| + | aws ec2 describe-images --owners amazon --filters ' | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Debug | ||
| + | |||
| + | ~~~bash | ||
| + | aws ec2 describe-regions --debug | ||
| + | ~~~ | ||
| + | |||
