Aws: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
=what does it mean= | =what does it mean= | ||
iam Identity and Access Management | iam Identity and Access Management | ||
waf web application firewall | waf web application firewall | ||
=aws completion= | |||
complete -C '/usr/bin/aws_completer' aws | |||
=version= | =version= | ||
aws --version | aws --version | ||
=whoami= | =whoami= | ||
aws sts get-caller-identity | aws sts get-caller-identity | ||
=which groups do I belong to= | =which groups do I belong to= | ||
aws iam list-groups | aws iam list-groups | ||
=list databases= | =list databases= | ||
aws rds describe-db-instances | aws rds describe-db-instances | ||
=List databases short version= | =List databases short version= | ||
aws rds describe-db-instances --region=eu-west-1 --query 'DBInstances[*].[DBInstanceArn,Engine,DBInstanceIdentifier]' | aws rds describe-db-instances --region=eu-west-1 --query 'DBInstances[*].[DBInstanceArn,Engine,DBInstanceIdentifier]' | ||
=list events= | =list events= | ||
aws rds describe-events | aws rds describe-events | ||
aws rds describe-events --duration 10080 | aws rds describe-events --duration 10080 | ||
aws rds describe-events --duration 10080 --region=eu-west-1 --source-identifier admin-db-test-01 --source-type db-instance | aws rds describe-events --duration 10080 --region=eu-west-1 --source-identifier admin-db-test-01 --source-type db-instance | ||
=list logfiles= | =list logfiles= | ||
aws rds describe-db-log-files --region=eu-west-1 --db-instance-identifier admin | aws rds describe-db-log-files --region=eu-west-1 --db-instance-identifier admin | ||
=view logfiles= | =view logfiles= | ||
aws rds download-db-log-file-portion --region=eu-west-1 --db-instance-identifier admin --log-file-name error/mysql-error-running.log.2022-05-05.14 --output text | aws rds download-db-log-file-portion --region=eu-west-1 --db-instance-identifier admin --log-file-name error/mysql-error-running.log.2022-05-05.14 --output text | ||
=List files in s3= | =List files in s3= | ||
aws s3 ls | aws s3 ls | ||
Line 42: | Line 35: | ||
=configure for kubectl= | =configure for kubectl= | ||
aws eks --region eu-north-1 update-kubeconfig --name kafka-prod-cluster | aws eks --region eu-north-1 update-kubeconfig --name kafka-prod-cluster | ||
=list roles= | =list roles= | ||
aws iam list-roles | jq -r '.Roles[].RoleName' | aws iam list-roles | jq -r '.Roles[].RoleName' | ||
=assume role= | =assume role= | ||
aws sts assume-role --role-arn arn:aws:iam::288898264342:role/eks-cluster-role-kafka-prod-cluster --role-session-name eks-cluster-role-kafka-prod-cluster | aws sts assume-role --role-arn arn:aws:iam::288898264342:role/eks-cluster-role-kafka-prod-cluster --role-session-name eks-cluster-role-kafka-prod-cluster | ||
=list users= | =list users= | ||
aws iam list-users | jq -r '.Users[].UserName' | aws iam list-users | jq -r '.Users[].UserName' |
Revision as of 19:48, 6 January 2024
what does it mean
iam Identity and Access Management waf web application firewall
aws completion
complete -C '/usr/bin/aws_completer' aws
version
aws --version
whoami
aws sts get-caller-identity
which groups do I belong to
aws iam list-groups
list databases
aws rds describe-db-instances
List databases short version
aws rds describe-db-instances --region=eu-west-1 --query 'DBInstances[*].[DBInstanceArn,Engine,DBInstanceIdentifier]'
list events
aws rds describe-events aws rds describe-events --duration 10080 aws rds describe-events --duration 10080 --region=eu-west-1 --source-identifier admin-db-test-01 --source-type db-instance
list logfiles
aws rds describe-db-log-files --region=eu-west-1 --db-instance-identifier admin
view logfiles
aws rds download-db-log-file-portion --region=eu-west-1 --db-instance-identifier admin --log-file-name error/mysql-error-running.log.2022-05-05.14 --output text
List files in s3
aws s3 ls
Create bucket
aws --endpoint-url http://localhost:9000 s3 mb s3://minsio make_bucket: minsio
Push files to bucket.
aws --endpoint-url http://localhost:9000 s3 sync . s3://minsio
eksctl install
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | sudo tar xz -C /usr/local/bin
list eks clusters
aws eks list-clusters --region eu-north-1
configure for kubectl
aws eks --region eu-north-1 update-kubeconfig --name kafka-prod-cluster
list roles
aws iam list-roles | jq -r '.Roles[].RoleName'
assume role
aws sts assume-role --role-arn arn:aws:iam::288898264342:role/eks-cluster-role-kafka-prod-cluster --role-session-name eks-cluster-role-kafka-prod-cluster
list users
aws iam list-users | jq -r '.Users[].UserName'
get info about certain user
aws iam get-user --user-name abjorklund
list ec2 instances
aws ec2 describe-instances | jq -r '.Reservations[].Instances[] | [.PrivateIpAddress, .InstanceType, .KeyName, .PublicIpAddress, (.Tags[] | .Key, .Value)] | join("\t")' | column_tab | less
list vpcs
aws ec2 describe-vpcs | jq -r '.Vpcs[].CidrBlock'
list securitygroups
aws ec2 describe-security-groups | jq -r .SecurityGroups[].GroupName