mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(kb/ec2): promote ec2 placeholder to article with child
This commit is contained in:
57
knowledge base/cloud computing/aws/ec2.md
Normal file
57
knowledge base/cloud computing/aws/ec2.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Title
|
||||
|
||||
1. [TL;DR](#tldr)
|
||||
1. [Disks](#disks)
|
||||
1. [Further readings](#further-readings)
|
||||
1. [Sources](#sources)
|
||||
|
||||
## TL;DR
|
||||
|
||||
<details>
|
||||
<summary>Real world use cases</summary>
|
||||
|
||||
```sh
|
||||
# Get the IDs of running nginx instances in 'dev'.
|
||||
aws ec2 describe-instances --output 'text' \
|
||||
--query 'Reservations[].Instances[].InstanceId[]'
|
||||
--filters \
|
||||
'Name=instance-state-name,Values=running' \
|
||||
'Name=tag:env,Values=dev' \
|
||||
'Name=tag:app,Values=nginx' \
|
||||
|
||||
# Start SSM sessions to specific machines.
|
||||
aws ec2 describe-instances --output text \
|
||||
--query 'Reservations[].Instances[].InstanceId' \
|
||||
--filters \
|
||||
'Name=app,Values=mysql' \
|
||||
'Name=instance-state-name,Values=running' \
|
||||
| xargs -ot aws ssm start-session --target
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Disks
|
||||
|
||||
See [EBS].
|
||||
|
||||
## Further readings
|
||||
|
||||
- [AWS EC2 Instance pricing comparison]
|
||||
- [EC2Instances.info on vantage.sh]
|
||||
|
||||
### Sources
|
||||
|
||||
<!--
|
||||
References
|
||||
-->
|
||||
|
||||
<!-- In-article sections -->
|
||||
<!-- Knowledge base -->
|
||||
[ebs]: ebs.md
|
||||
[ssm]: ssm.md
|
||||
|
||||
<!-- Files -->
|
||||
<!-- Upstream -->
|
||||
<!-- Others -->
|
||||
[aws ec2 instance pricing comparison]: https://ec2instances.github.io/
|
||||
[ec2instances.info on vantage.sh]: https://instances.vantage.sh/
|
||||
Reference in New Issue
Block a user