Create an AWS User using CLI2 Command at a specific Path


If you want to create a new user using AWS CLI2 at a specific path, you can do that using the create-user command with --path option.

Example:

dev@devs-MacBook-Air / % aws iam create-user \
--user-name Sammy \
--path /dept/it/python/

-------------------------------------------------------------------------
|                              CreateUser                               |
+-----------------------------------------------------------------------+
||                                User                                 ||
|+------------+--------------------------------------------------------+|
||  Arn       |  arn:aws:iam::XX1303XX01XX:user/dept/it/python/Sammy   ||
||  CreateDate|  2023-09-29T16:01:13+00:00                             ||
||  Path      |  /dept/it/python/                                      ||
||  UserId    |  AIDAVIH3DRXXBOWLLXXTG                                 ||
||  UserName  |  Sammy                                                 ||
|+------------+--------------------------------------------------------+|

AWS CLI 2 Create User at a PATH Command

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap