skip to Main Content

I have the requirements to create an IAM user programmatically in AWS.

Unfortunately all of the examples I have found online require the nuget package AWSSDK.

The AWSSDK package is deprecated and I do not want to use something that should be updated.

Does anyone have any links or examples of creating an IAM user using AWSSDK.Core or AWSSDK.IdentityManagement?

TIA

2

Answers


  1. I found documentation for aws-sdk for .net which may be helpful. Link to Github and aws documentation below

    https://github.com/aws/aws-sdk-net

    https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/quick-start.html

    enter image description here

    Login or Signup to reply.
  2. Install NuGet package: AWSSDK.IdentityManagement

            var identityService = new AmazonIdentityManagementServiceClient(new BasicAWSCredentials("accessKey", "secretKey"));
            var createUserRequest = new CreateUserRequest
                                    {
                                        UserName = "newUsername",
                                    };
            var createUserResponse = identityService.CreateUser(createUserRequest);
            var createdUser = createUserResponse.User;
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search