AWS IAM

devops

Well-known member
  • Apr 3, 2023
    605
    463
    63
    colombo
    How to restrict AWS IAM users so they can only manage their own resources?

    Question:
    I need to create around 500 AWS IAM users. The goal is to give them hands-on experience with AWS, mainly with EC2.

    What I want is:

    When a user creates a resource (like an EC2 instance, load balancer, etc.), that resource should only be available to that same user.
    No other user should be able to view, modify, or delete another user’s resources.

    For example, if User A launches an EC2 instance, only User A should be able to manage that instance, not User B.

    I also plan to use Terraform to automate creating the IAM users and applying the necessary policies. Is Terraform a good choice for this setup?

    I already tried working on this, but I’m still failing because when an EC2 instance is created, other resources (like volumes, network interfaces, etc.) are also automatically created. I believe those related resources also need to be tagged consistently; otherwise, the policy won’t work as expected.

    So my question is: is this scenario actually doable with IAM policies and tagging, or do I need a different approach?
     

    Don GasCan

    Well-known member
  • Nov 3, 2010
    42,489
    48,717
    113
    සේදවත්ත
    ටෙරාෆෝම් හෝ ඇන්සිබල් යුස් කරන්න .
    500 ම එකම පොල්සි එකෙන් එකම විදියට හැදෙයි නෙමින් එක මොකක් හරි නාමාපදය{number} වගේ හැදෙන්න ලියන්න .
     

    shaggy_123

    Well-known member
  • May 10, 2011
    1,571
    647
    113
    sri lanka
    terraform use karanna. kohomath EC2 ekata at least one volume one. ai volume and network netiwa EC2 ekak hadanne ? IAM policies use karala creater ta witharak access dena eka awlak ne.