Thursday, December 7, 2023
HomeSoftware EngineeringHow one can script AWS AppStream 2.0 ImageBuilder

How one can script AWS AppStream 2.0 ImageBuilder

AppStream (2.0) is a completely managed non-persistent desktop and utility service for remotely accessing your work.

The ImageBuilder varieties the primary stage within the creation and definition of a picture that can be utilized to stream.

You should utilize the AWS CLI to provoke the creation of a picture in ImageBuilder:

aws appstream create-image-builder 
  --name <identify> 
  --image-name <image_name> 
  --instance-type <instance_type> 
  --vpc-config SubnetIds=<subnet_ids>,SecurityGroupIds=<security_group_ids> 
  --iam-role-arn <iam_role_arn> 

Swap out the above gadgets with your individual values:

<identify> = “org-image-name”
<image_name> = “AppStream-WinServer2019-10-08-2021”
<instance_type> = stream.commonplace.small
<subnet_ids> = subnet-xxxxxxxxxxxx1234
<security_group_ids> = sg-xxxxxxxxxxxx1234
<iam_role_arn> = arn:aws:iam::xxxxxxxx1234:function/SomeRoleName

How one can create the function

For the Permissions, you will want so as to add coverage definitions of the providers this occasion will name out to. This might embrace AmazonS3FullAccess, AmazonFSxFullAccess and AmazonAppStreamServiceAccess for instance.

Moreover, you will need to be certain that the belief relationship is ready to A coverage belief relationship would look one thing like this:

  "Model": "2012-10-17",
  "Assertion": [
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Service": ""
      "Action": "sts:AssumeRole"

How one can Be a part of an Energetic Listing Area on Creation

If you need to hitch an Energetic Listing Area on creation, then additionally, you will have to move the --domain-join-info flag to the create-image-builder command above.

This may be executed as follows:

<meta charset="utf-8">aws appstream create-image-builder 
  --name <identify> 
  --image-name <image_name> 
  --instance-type <instance_type> 
  --vpc-config SubnetIds=<subnet_ids>,SecurityGroupIds=<security_group_ids> 
  --iam-role-arn <iam_role_arn> 
  --domain-join-info '{"DirectoryName": "<listing>","OrganizationalUnitDistinguishedName": "<OU>"}' 

The <listing> and <OU> should be created and configured within the DirectoryConfig part of AppStream.

An instance worth of the above may very well be:

--domain-join-info '{"DirectoryName": "","OrganizationalUnitDistinguishedName": "OU=Computer systems,OU=yourcloud,DC=your,DC=cloud"}'



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments