Log in to ECR with Docker
Log Docker in to ECR through stdin, so the token does not end up in shell history
aws ecr get-login-password --region <id> | docker login --username AWS --password-stdin <id>.dkr.ecr.<id>.amazonaws.com
- tool
- aws14 commands
More aws commands
-
aws ssm start-session --target i-<id> --region <id>Open an interactive shell on an instance without an open port 22 or a bastion
-
aws logs tail /aws/lambda/<name> --follow --since 10m --format shortStream a log group like tail -f. Much easier than polling with filter-log-events
-
aws iam simulate-principal-policy --policy-source-arn <id> --action-names s3:GetObject --resource-arns <id> --query 'EvaluationResults[].{action:EvalActionName,decision:EvalDecision}' --output tableCheck if a principal can do an action before you grant access. Shows allow or deny
-
aws secretsmanager get-secret-value --secret-id <name> --query SecretString --output text | jq -r '.password'Get a JSON secret and extract one field. Note: the password is printed to the terminal
-
aws ec2 describe-spot-price-history --instance-types m6i.large --product-descriptions 'Linux/UNIX' --start-time $(date -u +%Y-%m-%dT%H:%M:%S) --query 'sort_by(SpotPriceHistory,&SpotPrice)[0:5].[AvailabilityZone,SpotPrice]' --output tableSort the current spot price history to find the cheapest AZ for an instance type