TGViewer
AWS Notes AWS Notes @aws_notes · 5.82K subscribers
Post #3399 3.16K
Начиная с версии AWS CLI v2.30.3 можно генерить/обновлять креды для IAM юзеров с MFA без сторонних утилит с помощью команды:

aws configure mfa-login

Для удобства лучше сразу добавить имя генерируемого профиля с помощью --update-profile , иначе сгенерит автоматически, а также --duration-seconds , максимум на 36 часов и ARN устройства --serial-number, чтобы не вводить отдельно:

# aws --profile=aws-notes-s3-user configure mfa-login --update-profile=mfa-aws-notes-s3-user --duration-seconds=129600 --serial-number=arn:aws:iam::984475386489:mfa/My-iPhone

MFA token code: 969969
Temporary credentials written to profile 'mfa-aws-notes-s3-user'
Credentials will expire at 2025-09-18T19:50:40+00:00
To use these credentials, specify --profile mfa-aws-notes-s3-user when running AWS CLI commands


# aws --profile mfa-aws-notes-s3-user s3 ls

2018-11-18 16:17:32 aws-notes-test


p.s. IAM юзеры зло — используйте SSO (IAM Identity Center).

#aws_cli
GitHub aws-cli/CHANGELOG.rst at v2 · aws/aws-cli Universal Command Line Interface for Amazon Web Services - aws/aws-cli
  • 👍 14
  • 💯 2
More from @aws_notes
  1. Sep 25, 2026Post #3689
  2. Sep 23, 2026Приглашаем на встречу Gnomish Factory: зачем я написал ещё одну Dark Factory Про тёмные фа…
  3. Sep 21, 2026🆕 Beanstalk + EKS Auto Mode = Beanstalk Cluster Mode 🎉 https://aws.amazon.com/blogs/aws/…
  4. Sep 20, 2026T8i — новое поколение burstable T-инстансов https://aws.amazon.com/blogs/aws/new-low-cost-…
  5. Sep 18, 2026Morning, people jan! We got some BIG news for students. 🥳 Time to get 12 Months of Skill…
  6. Sep 16, 2026Post #3684
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →