Friday, February 17, 2023
HomeSoftware EngineeringFind out how to script AWS AppStream 2.0 ImageBuilder

Find out how to script AWS AppStream 2.0 ImageBuilder


AppStream (2.0) is a completely managed non-persistent desktop and software 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 use the AWS CLI to provoke the creation of a picture in ImageBuilder:

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

Swap out the above objects with your individual values:

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

Find out how to create the function

For the Permissions, you have to so as to add coverage definitions of the companies this occasion will name out to. This might embody AmazonS3FullAccess, AmazonFSxFullAccess and AmazonAppStreamServiceAccess for example.

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

{
  "Model": "2012-10-17",
  "Assertion": [
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": {
        "Service": "appstream.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}

Find out how to Be a part of an Energetic Listing Area on Creation

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

This may be achieved as follows:

<meta charset="utf-8">aws appstream create-image-builder 
  --name <title> 
  --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>"}' 
  --enable-default-internet-access

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

An instance worth of the above may very well be:

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

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments