Sunday, December 29, 2019

aws


solution on connecting ssh 
https://unix.stackexchange.com/questions/115838/what-is-the-right-file-permission-for-a-pem-file-to-ssh-and-scp

fix the security problem in ec2
sudo yum update
before:
aws-cli/1.16.102 Python/2.7.16 Linux/4.14.138-89.102.amzn1.x86_64 botocore/1.12.92
sudo pip install --upgrade awscli
after:
aws-cli/1.16.309 Python/2.7.16 Linux/4.14.138-89.102.amzn1.x86_64 botocore/1.13.45

commands
aws iam list-users
aws iam create-user --user-name Lynard
aws iam list-policies
aws iam attach-user-policy --user-name Lynard --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
aws iam list-attached-user-policies --user-name Lynard
aws iam add-user-to-group --user-name Lynard --group-name Marketing
aws iam get-group --group-name Marketing
aws iam remove-user-from-group --user-name Lynard --group-name Marketing
aws iam detach-user-policy --user-name Lynard --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
aws iam delete-user --user-name Lynard

groups
aws iam create-group --group-name Accounting
aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess --group-name Accounting
aws iam list-attached-group-policies --group-name Accounting
aws iam detach-group-policy --group-name Accounting --policy-arn arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess
aws iam delete-group --group-name Accounting
aws iam list-groups


No comments:

Post a Comment

free online comma separating tool

https://delim.co/#