b2c-backend-aws-mfa

Refresh AWS MFA session tokens and update the default credentials file.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/herren-official/product-agents --skill b2c-backend-aws-mfa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: b2c-backend-aws-mfa
Source: https://github.com/herren-official/product-agents/tree/main/skills/b2c-backend/aws-mfa
Command: npx skills add https://github.com/herren-official/product-agents --skill b2c-backend-aws-mfa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MFA 정책이 적용된 AWS 계정에서 임시 세션 토큰 만료 및 갱신으로 인해 CLI/Terraform 등의 작업이 자동으로 중단되는 문제를 해결합니다. 이 스킬은 MFA 세션을 갱신하고 기본 프로파일을 ~/.aws/credentials 파일에 업데이트하여 인증이 지속되도록 합니다.

Core Features & Use Cases

  • MFA 세션 갱신 및 기본 자격 증명 업데이트: MFA 코드 입력 후 STS 세션 토큰 발급 및 [default] 프로파일 갱신.
  • 파일 기반 인증 지속성: CLI, SDK, Terraform 등에서 인증을 지속적으로 유지하도록 자격 증명을 관리합니다.
  • 에러 핸들링 및 자동 회복: 만료된 세션이나 잘못된 MFA 코드 시 안내 및 복구 절차를 제공합니다.

Quick Start

MFA 코드를 입력해 세션을 갱신하고 기본 자격 증명을 자동으로 업데이트하도록 요청합니다.

Frequently Asked Questions about b2c-backend-aws-mfa

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refresh AWS MFA session tokens for CLI operations?

To refresh AWS MFA session tokens, you must validate the current session, input your MFA code, and obtain a new session token via STS. This Skill automates that process and writes the fresh temporary credentials into your local configuration.

Why does Terraform fail when my AWS MFA session expires?

Terraform fails when an AWS MFA session expires because MFA policies block operations with outdated temporary credentials. You need to obtain fresh session tokens via STS and update your credentials file to resume infrastructure automation without authentication interruptions.

How to update the default AWS credentials profile after getting an STS session token?

Updating the default AWS credentials profile requires writing the newly obtained STS session token, access key, and secret key directly into the ~/.aws/credentials file. This ensures the default profile automatically uses the refreshed temporary credentials.

Can I automate AWS CLI authentication when MFA policies block commands?

You can automate AWS CLI authentication by requesting a session token through STS after entering your MFA code. This process updates the default profile in your credentials file, allowing CLI and SDK operations to persist without manual token reentry.

What happens if I enter an invalid MFA code during AWS session renewal?

If you enter an invalid MFA code during AWS session renewal, the STS request fails. This Skill provides error handling and recovery guidance, prompting you to correct the code and successfully regenerate the session token.

Does this MFA session refresh create a base profile if one is missing?

Yes, this MFA session refresh creates a base profile if one is needed. When updating the ~/.aws/credentials file, it ensures a valid default profile exists before writing the new STS session tokens for continuous authentication.