mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore(kb): improve readibility, fix minor issues
This commit is contained in:
@@ -49,10 +49,12 @@ From [Using service-linked roles]:
|
||||
- [EC2]
|
||||
- [Services that publish CloudWatch metrics]
|
||||
- [Using service-linked roles]
|
||||
- [Best Practices for Tagging AWS Resources]
|
||||
|
||||
### Sources
|
||||
|
||||
- [Constraints for tags][constraints tag]
|
||||
- [What is cloudWatch]
|
||||
|
||||
<!--
|
||||
References
|
||||
@@ -65,7 +67,8 @@ From [Using service-linked roles]:
|
||||
[ec2]: ec2.md
|
||||
|
||||
<!-- Upstream -->
|
||||
[best practices for tagging aws resources]: https://docs.aws.amazon.com/whitepapers/latest/tagging-best-practices/tagging-best-practices.html
|
||||
[constraints tag]: https://docs.aws.amazon.com/directoryservice/latest/devguide/API_Tag.html
|
||||
[services that publish cloudwatch metrics]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html
|
||||
[what is cloudwatch]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html
|
||||
[using service-linked roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html
|
||||
[what is cloudwatch]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html
|
||||
|
||||
@@ -31,6 +31,9 @@ export AWS_PROFILE='work'
|
||||
# Enable auto-prompt mode (like `aws-shell` does).
|
||||
aws configure set 'cli_auto_prompt' 'on-partial'
|
||||
export AWS_CLI_AUTO_PROMPT='on'
|
||||
|
||||
# Clear cached credentials.
|
||||
rm -r ~'/.aws/cli/cache'
|
||||
```
|
||||
|
||||
</details>
|
||||
@@ -50,6 +53,35 @@ aws deploy get-deployment-group --application-name 'batman' \
|
||||
--deployment-group-name 'production'
|
||||
|
||||
|
||||
# Access shells on containers in ECS.
|
||||
aws ecs execute-command \
|
||||
--cluster 'clusterName' --task 'taskId' --container 'containerName' \
|
||||
--interactive --command '/bin/bash'
|
||||
|
||||
|
||||
# Get information about the current user.
|
||||
aws sts get-caller-identity
|
||||
|
||||
# List IAM users.
|
||||
aws iam list-users
|
||||
aws iam list-users --max-items '1'
|
||||
aws iam list-users --query "Users[?(UserName=='mario')]"
|
||||
aws iam list-users --query "Users[?(UserId=='AIDA…')].UserName"
|
||||
|
||||
# Create IAM users.
|
||||
aws iam create-user --user-name 'luigi'
|
||||
|
||||
# Create access keys.
|
||||
# Defaults to the current user if no user name is specified.
|
||||
aws iam create-access-key
|
||||
aws iam create-access-key --user-name 'luigi'
|
||||
|
||||
# List access keys.
|
||||
# Defaults to the current user if no user name is specified.
|
||||
aws iam list-access-keys
|
||||
aws iam list-access-keys --user-name 'mario'
|
||||
|
||||
|
||||
# Show RDS instances.
|
||||
aws rds describe-db-instances
|
||||
aws rds describe-db-instances --output 'json' --query "DBInstances[?(DBInstanceIdentifier=='master-prod')]"
|
||||
@@ -77,16 +109,6 @@ aws secretsmanager get-secret-value --secret-id 'ecr-pullthroughcache/github'
|
||||
|
||||
# List SNS queues (a.k.a. 'topics').
|
||||
aws sns list-topics
|
||||
|
||||
|
||||
# Get information about the current user.
|
||||
aws sts get-caller-identity
|
||||
|
||||
# List IAM users.
|
||||
aws iam list-users
|
||||
aws iam list-users --max-items '1'
|
||||
aws iam list-users --query "Users[?(UserName=='mario')]"
|
||||
aws iam list-users --query "Users[?(UserId=='AIDA…')].UserName"
|
||||
```
|
||||
|
||||
Subcommands not listed here are in their own service-specific article:
|
||||
@@ -194,6 +216,7 @@ aws ssm start-session --target 'i-0123456789abcdef0'
|
||||
|
||||
- [Improved CLI auto-prompt mode]
|
||||
- [Install the Session Manager plugin for the AWS CLI]
|
||||
- [Use an IAM role in the AWS CLI]
|
||||
|
||||
<!--
|
||||
References
|
||||
@@ -217,3 +240,4 @@ aws ssm start-session --target 'i-0123456789abcdef0'
|
||||
[improved cli auto-prompt mode]: https://github.com/aws/aws-cli/issues/5664
|
||||
[install the session manager plugin for the aws cli]: https://docs.aws.amazon.com/systems-manager/latest/userguide/install-plugin-macos-overview.html#install-plugin-macos-signed
|
||||
[quickstart]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html
|
||||
[use an iam role in the aws cli]: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html
|
||||
|
||||
Reference in New Issue
Block a user