Skip to content

safinn/rotate-aws-key

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm package npm downloads

rotate-aws-key 🔄

Rotate AWS access keys.

  • Create new and delete old AWS access keys.
  • Replaces the key in the AWS credentials file.
  • Optionally replace the key in a env file.

Usage

npx rotate-aws-key

By default, rotate-aws-key attempts to rotate the default profile access key in the AWS credentials file normally found at ~/.aws/credentials.

Options

Flags Description
-o, --output Print the new access keys generated in the console
-p, --profiles Allows choosing up to 2 profiles in the credentials file to rotate
-e, --env Replaces access key environment variables in a provided file defaulting to ./.env. Only if 1 profile is being rotated.