SSM-сессия без SSH aws
Интерактивная сессия на инстансе без открытого 22 порта и бастиона
aws ssm start-session --target i-<id> --region <id>
more aws
all 14 commands →
Хвост логов Lambda/CloudWatch
aws logs tail /aws/lambda/<name> --follow --since 10m --format short
Симулировать решение IAM
aws iam simulate-principal-policy --policy-source-arn <id> --action-names s3:GetObject --resource-arns <id> --query 'EvaluationResults[].{action:EvalActionName,decision:EvalDecision}' --output table
Прочитать значение секрета
aws secretsmanager get-secret-value --secret-id <name> --query SecretString --output text | jq -r '.password'
Дешёвый spot по AZ
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 table
Деплой стека CloudFormation
aws cloudformation deploy --template-file stack.yaml --stack-name <name> --capabilities CAPABILITY_NAMED_IAM --parameter-overrides Env=prod --no-fail-on-empty-changeset