<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aashish Jolly</title>
    <description>The latest articles on DEV Community by Aashish Jolly (@aajolly).</description>
    <link>https://dev.to/aajolly</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1574048%2F464fe82f-b921-4fcf-8ab4-d1731f99c149.jpg</url>
      <title>DEV Community: Aashish Jolly</title>
      <link>https://dev.to/aajolly</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aajolly"/>
    <language>en</language>
    <item>
      <title>How I Set Up Amazon WorkSpaces Pools with Okta for Call Center Agents</title>
      <dc:creator>Aashish Jolly</dc:creator>
      <pubDate>Mon, 10 Mar 2025 09:47:14 +0000</pubDate>
      <link>https://dev.to/aajolly/how-i-set-up-amazon-workspaces-pools-with-okta-for-call-center-agents-1nk0</link>
      <guid>https://dev.to/aajolly/how-i-set-up-amazon-workspaces-pools-with-okta-for-call-center-agents-1nk0</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Recently, I worked on a project where I had to set up &lt;strong&gt;Amazon WorkSpaces Pools&lt;/strong&gt; integrated with &lt;strong&gt;Okta for authentication&lt;/strong&gt; and domain-joined using &lt;strong&gt;Microsoft Active Directory (AD)&lt;/strong&gt;. The goal was to provide a scalable and cost-effective virtual desktop solution for call center agents, ensuring seamless access to cloud-based desktops while optimizing costs. Instead of assigning individual WorkSpaces to users, I leveraged WorkSpaces Pools to dynamically allocate desktops based on demand, improving resource utilization.&lt;/p&gt;

&lt;p&gt;This is the first post in a &lt;strong&gt;three-part blog series&lt;/strong&gt; where I will cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Setting up basic WorkSpaces Pools&lt;/strong&gt; (this post)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configuring FSLogix for user profile persistence&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integrating WorkSpaces Pools with Amazon Connect&lt;/strong&gt; for a seamless call center experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This post will focus on setting up WorkSpaces Pools, the key considerations, challenges I faced, and best practices for deploying them in a call center environment.&lt;/p&gt;

&lt;h1&gt;
  
  
  Understanding WorkSpaces Pools
&lt;/h1&gt;

&lt;p&gt;WorkSpaces Pools is a feature of Amazon WorkSpaces that provides shared, non-persistent virtual desktops for users. Unlike WorkSpaces Personal, which assigns dedicated desktops to individual users, Pools allocates desktops dynamically from a shared pool when users log in.&lt;/p&gt;

&lt;p&gt;Key benefits for call centers include:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxsm1jhn64glv08vugh3m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxsm1jhn64glv08vugh3m.png" alt="Benefits" width="800" height="746"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Initial Planning &amp;amp; Prerequisites
&lt;/h1&gt;

&lt;p&gt;Before setting up WorkSpaces Pools, several factors need careful consideration to ensure a successful deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Estimating the Number of WorkSpaces Needed&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instead of provisioning WorkSpaces for every agent, focus on &lt;strong&gt;concurrent users&lt;/strong&gt;. For example, if your call center has &lt;strong&gt;500 agents but only 200 active per shift&lt;/strong&gt;, you only need around &lt;strong&gt;200 WorkSpaces in the pool&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Selecting the Right WorkSpaces Bundle&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Standard (2 vCPUs, 4GB RAM)&lt;/strong&gt; – Best for general call center applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance (2 vCPUs, 8GB RAM)&lt;/strong&gt; – For agents running multiple applications concurrently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Power (4 vCPUs, 16GB RAM)&lt;/strong&gt; – Rarely needed for call centers unless running intensive software.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Licensing Model&lt;/strong&gt;:&lt;br&gt;
Decide between &lt;strong&gt;AWS-provided licenses&lt;/strong&gt; or &lt;strong&gt;BYOL (Bring Your Own License)&lt;/strong&gt; if your organization has existing Windows Desktop licenses.&lt;/p&gt;
&lt;h1&gt;
  
  
  Architecture Overview
&lt;/h1&gt;
&lt;h2&gt;
  
  
  High Level Architecture Diagram
&lt;/h2&gt;

&lt;p&gt;The diagram below is a high-level architeture of how WorkSpaces Pools fit into an organization’s AWS environment. I will expand this architecture in future posts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frj1unpbo2gt0ueumy84e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frj1unpbo2gt0ueumy84e.png" alt="Architecture" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  User Authentication Flow
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpd28uz0uggxaxmcpufxj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpd28uz0uggxaxmcpufxj.png" alt="User Authentication Flow" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Deployment &amp;amp; Configuration
&lt;/h1&gt;

&lt;p&gt;I won’t cover the deployment &amp;amp; configuration of constructs like VPC and Managed AD. You can use &lt;a href="https://github.com/aws-samples/getting-started-with-amazon-workspaces-workshop-template/blob/main/cloudformation.yaml" rel="noopener noreferrer"&gt;this&lt;/a&gt; CloudFormation template to get you up &amp;amp; running quickly.&lt;/p&gt;

&lt;p&gt;Here’s a summary of steps for configuring WorkSpaces Pools.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Configure Active Directory (AD)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Store credentials in AWS Secrets Manager&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integrate OKTA with AD &amp;amp; WorkSpaces Pools&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Setup AWS IAM for SAML Federation&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Setup WorkSpaces Pools Directory&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create AWS IAM Role for SAML federation&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finalize Okta Configuration&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create the WorkSpaces Pool&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test the Deployment&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The sections that follow provide detailed step-by-step instructions on setting up WorkSpaces Pools.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Configure Active Directory (AD)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Create an Organizational Unit (OU) dedicated for WorkSpaces. I prefer to create separate OUs for computer &amp;amp; user objects. This will enable you to apply Group Policies to enforce security &amp;amp; enterprise standards followed within your organization.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdp9xdl2f7odpcbxsx5rc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdp9xdl2f7odpcbxsx5rc.png" alt="WSPools_OU" width="480" height="918"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a service account that WorkSpaces Pools will use for creating computer objects. It is essential to follow the principle of least priviledge and &lt;a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/active-directory-admin.html#active-directory-permissions" rel="noopener noreferrer"&gt;this&lt;/a&gt; document covers the minimal permissions required.&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F642mq7kes3pmr64jom9q.gif" alt="Create Service Account for WorkSpaces Pools" width="800" height="800"&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;Create Service Account for WorkSpaces Pools&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnqvj6m1c4895hik6045c.gif" alt="Assign permissions to service account" width="800" height="800"&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;Assign permissions to service account&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;While this section doesn’t cover creation of users &amp;amp; groups, create a dedicated group for WorkSpaces pools and assign users to it. Later on, we’ll assign this group access to WorkSpaces Pools in OKTA.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;Create a service account with readOnly permissions. This is used for OKTA Directory Integration will use for synchronizing user &amp;amp; group objects. &lt;a href="https://help.okta.com/en-us/content/topics/directory/ad-agent-prerequisites.htm" rel="noopener noreferrer"&gt;This&lt;/a&gt; document covers the minimal permissions required.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  2. Store credentials in AWS Secrets Manager
&lt;/h2&gt;

&lt;p&gt;The service account created in Step 2 above &lt;strong&gt;must be stored in AWS Secrets Manager&lt;/strong&gt; and &lt;strong&gt;encrypted&lt;/strong&gt; using a AWS Key Management Service (&lt;strong&gt;AWS KMS&lt;/strong&gt;) customer managed key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KMS Key Policy to use&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Version": "2012-10-17",
  "Statement": [
        {
            "Sid": "Enable IAM User Permissions",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::000011112222:root"
            },
            "Action": "kms:*",
            "Resource": "*"
        },
        {
            "Sid": "Allow access for Workspaces SP",
            "Effect": "Allow",
            "Principal": {
                "Service": "workspaces.amazonaws.com"
            },
            "Action": "kms:Decrypt",
            "Resource": "*"
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key/Value Pairs must be created with the following names&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Key&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Service Account Name&lt;/td&gt;
&lt;td&gt;domain\username&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Service Account Password&lt;/td&gt;
&lt;td&gt;&amp;lt; Password &amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Following the priniple of least priviledge, use the below permission policy to allow WorkSpaces to the specific secret only.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "workspaces.amazonaws.com"
            },
            "Action": "secretsmanager:GetSecretValue",
            "Resource": "arn:aws:secretsmanager:ap-southeast-2:00001111222:secret:DemoSecret-e0nmLJ"
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Integrate OKTA with AD &amp;amp; WorkSpaces Pools
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Setup OKTA AD Agent
&lt;/h3&gt;

&lt;p&gt;Setting up Active Directory Integration for OKTA is quite straight forward as OKTA provides a wizard to set it up. All you need is a domain-joined Windows Server 2016 or later that runs OKTA AD Agent a lightweight application. This server will require connectivity to OKTA. OKTA recommends running the wizard from the Windows Server. &lt;/p&gt;

&lt;p&gt;Path to the wizard: OKTA Portal → Directory → Directory Integrations → Add Directory → Add Active Directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup SAML application for WorkSpaces Pools
&lt;/h3&gt;

&lt;p&gt;To create a SAML application in OKTA:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Login to the OKTA Admin portal → Applications → Applications → Create App Integration.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;SAML 2.0&lt;/strong&gt; and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;General Settings&lt;/strong&gt;, enter the following:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App name&lt;/strong&gt;: &lt;code&gt;aajolly-workspaces-pools&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App logo&lt;/strong&gt;: Upload a picture. This icon is displayed to users when they login to their OKTA portal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App visibility&lt;/strong&gt;: Un-checked&lt;/li&gt;
&lt;li&gt;Under SAML Settigs, enter the following:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single sign-on URL&lt;/strong&gt;: &lt;code&gt;https://signin.aws.amazon.com/saml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audience URI (SP Entity ID)&lt;/strong&gt;: &lt;code&gt;urn:amazon:webservices&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Default RelayState&lt;/strong&gt;: &lt;code&gt;https://workspaces.euc-sso.ap-southeast-2.aws.amazon.com/sso-idp?registrationCode=PLACEHOLDER&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;We’ll update the registration code later once WorkSpaces Pools Directory is created. For more on relay state, please refer to the documentation &lt;a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/create-directory-pools.html#saml-directory-configure-relay-state" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Name ID format&lt;/strong&gt;: &lt;code&gt;Peristent&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Application username&lt;/strong&gt;: &lt;code&gt;Okta username&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Update application username on&lt;/strong&gt;: &lt;code&gt;Create and update&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Under &lt;strong&gt;Attribute Statements&lt;/strong&gt;, enter the following:&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Key&lt;/th&gt;
&lt;th&gt;Name format&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;https://aws.amazon.com/SAML/Attributes/PrincipalTag:Email&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unspecified&lt;/td&gt;
&lt;td&gt;user.email&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;https://aws.amazon.com/SAML/Attributes/RoleSessionName&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;URI Reference&lt;/td&gt;
&lt;td&gt;userName&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;https://aws.amazon.com/SAML/Attributes/SessionDuration&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Basic&lt;/td&gt;
&lt;td&gt;28800&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;https://aws.amazon.com/SAML/Attributes/Role&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;URI Reference&lt;/td&gt;
&lt;td&gt;&lt;code&gt;PLACEHOLDER&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Leave the defaults under Group Attributes.&lt;/li&gt;
&lt;li&gt;There are a few tasks to be completed on the final page.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Settings&lt;/strong&gt; → Sign on methods → SAML 2.0, click more details. Now &lt;strong&gt;copy&lt;/strong&gt; the &lt;strong&gt;Sign on URL&lt;/strong&gt; and &lt;strong&gt;Issuer&lt;/strong&gt; to your favorite note taking app, we’ll need this to configure the AWS IAM Identity Provider.&lt;/li&gt;
&lt;li&gt;Scroll down to the section &lt;strong&gt;SAML Signing Certificates&lt;/strong&gt; and click on View IdP metadata as shown in the screenshot below&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fahqrp5l0u2ol4l076121.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fahqrp5l0u2ol4l076121.png" alt="SAML Signing Certificate" width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It’ll open a new webpage, save it as an xml. This will be needed when configuring the IAM Identity Provider.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  4. Setup AWS IAM for SAML Federation
&lt;/h2&gt;

&lt;p&gt;With an AWS IAM identity provider (IdP), you can manage your user identities outside of AWS and give these external user identities permissions to use AWS resources in your account, in our case its the WorkSpaces Pools.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Login to the AWS Account where you want to provision WorkSpaces Pools.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;I recommended creating a dedicated AWS Account for this purpose. It helps with cost attribution and security enforcement apart from other benefits.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;From the left-pane select &lt;strong&gt;Identity providers&lt;/strong&gt; and then &lt;strong&gt;Add provider&lt;/strong&gt;, provide a name and upload the metadata file you downloaded from OKTA earlier. Use the screenshot below as a reference&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39etxtqccuuy1n1csbwd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39etxtqccuuy1n1csbwd.png" alt="IAM Identity Provider" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Setup WorkSpaces Pools Directory
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Browse to the WorkSpaces Service and select &lt;strong&gt;Directories&lt;/strong&gt; from the left panel.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create directory&lt;/strong&gt; and for WorkSpace type, select &lt;strong&gt;Pool&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Use the screenshots below for reference&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fit6c9an0ur1qqkhxc3dz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fit6c9an0ur1qqkhxc3dz.png" alt="WSPools-01" width="800" height="610"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyvqg9re3ki26amk72yhu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyvqg9re3ki26amk72yhu.png" alt="WSPools-02" width="800" height="589"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1o3kazru29zqdwxcm95c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1o3kazru29zqdwxcm95c.png" alt="WSPools-03" width="800" height="447"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tjy97nhfmourvzv70g8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tjy97nhfmourvzv70g8.png" alt="WSPools-04" width="800" height="564"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpruhhtz7h2kaer8yas8c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpruhhtz7h2kaer8yas8c.png" alt="WSPools-05" width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The IAM role is optional and its use will depend on your use case. I created one with the following trust relationship:&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Statement1",
            "Effect": "Allow",
            "Principal": {
                "Service": "workspaces.amazonaws.com"
            },
            "Action": "sts:AssumeRole"
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;The permission policy will depend on your use case.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once the directory is created, select it and &lt;strong&gt;copy&lt;/strong&gt; the values for the following attributes: &lt;strong&gt;Registration code&lt;/strong&gt; and &lt;strong&gt;Directory ID&lt;/strong&gt;. We’ll need these for the upcoming configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Create AWS IAM Role for SAML federation
&lt;/h2&gt;

&lt;p&gt;Configure an IAM role with the following trust relationship and permissions policy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;### Trust relationship ###
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Federated": "arn:aws:iam::000011112222:saml-provider/wspools"
            },
            "Action": [
                "sts:AssumeRoleWithSAML",
                "sts:TagSession"
            ],
            "Condition": {
                "StringEquals": {
                    "SAML:sub_type": "persistent"
                }
            }
        }
    ]
}

### Permissions Policy ###
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Statement1",
            "Effect": "Allow",
            "Action": [
                "workspaces:Stream"
            ],
            "Resource": [
                "arn:aws:workspaces:ap-southeast-2:000011112222:directory/wsd-abcdef123"
            ],
            "Condition": {
                "StringEquals": {
                    "workspaces:userId": "${saml:sub}"
                }
            }
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Replace &lt;strong&gt;000011112222&lt;/strong&gt; and &lt;strong&gt;wsd-abcdef123&lt;/strong&gt; with the respective AWS Account ID and Directory ID of the WorkSpaces Pools created earlier. For more details, please refer to the documentation &lt;a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/create-directory-pools.html#saml-directory-saml-federation-role-in-iam" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
Copy the &lt;strong&gt;arn&lt;/strong&gt; of the IAM Role and the IAM Identity Provider.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  7. Finalize Okta Configuration
&lt;/h2&gt;

&lt;p&gt;In this section we’ll update the OKTA configuration.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Login to the OKTA Portal → Applications → Applications.&lt;/li&gt;
&lt;li&gt;Select the application created earlier &lt;strong&gt;aajolly-ws-pools&lt;/strong&gt; and click the General tab.&lt;/li&gt;
&lt;li&gt;Edit &lt;strong&gt;SAML Settings&lt;/strong&gt; and Click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;SAML Settings&lt;/strong&gt;, update the &lt;strong&gt;Default Relay State&lt;/strong&gt; attribute and replace &lt;em&gt;PLACEHOLDER&lt;/em&gt; with the registration code of the WorkSpaces Pools Directory created earlier.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Update the &lt;strong&gt;Attribute Settings&lt;/strong&gt; and replace the value for &lt;code&gt;https://aws.amazon.com/SAML/Attributes/Role&lt;/code&gt; from &lt;em&gt;PLACEHOLDER&lt;/em&gt; to &lt;em&gt;ARN_OF_IAM_ROLE,ARN_OF_IAM_IDENTITY_PROVIDER&lt;/em&gt;. For more details, please take a look at the documentation &lt;a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/create-directory-pools.html#saml-directory-create-assertions" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow the prompts without making any changes and click Finish.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once done, select &lt;strong&gt;Assignments&lt;/strong&gt; and Click &lt;strong&gt;Assign&lt;/strong&gt; → &lt;strong&gt;Assign to People/Groups&lt;/strong&gt; and select the group synced from AD, select Assign followed by Done.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2829tgahfa52q3iq18z9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2829tgahfa52q3iq18z9.png" alt="WSPools-Directory-01" width="800" height="229"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Create the WorkSpaces Pools
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Back to AWS and WorkSpaces, select Pools under WorkSpaces in the left panel.&lt;/li&gt;
&lt;li&gt;Click Create WorkSpace&lt;/li&gt;
&lt;li&gt;For the &lt;strong&gt;Onboarding&lt;/strong&gt; section, select &lt;em&gt;I know what WorkSpace options I need for my use case&lt;/em&gt;. and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Give a name and description.&lt;/li&gt;
&lt;li&gt;Select a custom bundle if you created one earlier.&lt;/li&gt;
&lt;li&gt;Change the Minimum Capacity to 3 and leave the rest to defaults, click Next.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;Directory&lt;/strong&gt; created earlier and click &lt;strong&gt;Create WorkSpace pool&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Once created, click &lt;strong&gt;Start&lt;/strong&gt; and wait till the State == Running&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  9. Test the deployment
&lt;/h2&gt;

&lt;p&gt;It’s time to test!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User Perspective&lt;/strong&gt;: The user starts by navigating to the OKTA portal and is redirected to a WorkSpaces Pools portal, without having to enter AWS credentials. Only an Active Directory domain password is required.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0esqywwzq959hl5zimst.gif" alt="Login Experience" width="800" height="800"&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;em&gt;Login Experience&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h1&gt;
  
  
  Lessons Learned &amp;amp; Best Practices
&lt;/h1&gt;

&lt;p&gt;At this point, we have successfully configured WorkSpaces Pools with Okta, AWS Managed AD and AWS IAM. Now, let's discuss some challenges I faced during setup and how to overcome them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Networking
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Ensure that the VPC assigned to WorkSpaces Pools has a &lt;strong&gt;DHCP option set&lt;/strong&gt; that points to the &lt;strong&gt;AD DNS servers&lt;/strong&gt;. Otherwise, domain-join operations will fail.&lt;/li&gt;
&lt;li&gt;If using &lt;strong&gt;Managed AD&lt;/strong&gt;, the DHCP option set is sufficient. If using &lt;strong&gt;self-managed AD&lt;/strong&gt;, configure a &lt;strong&gt;conditional forwarder&lt;/strong&gt;. &lt;a href="https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_tutorial_setup_trust_prepare_mad.html" rel="noopener noreferrer"&gt;This&lt;/a&gt; blog post explains it.&lt;/li&gt;
&lt;li&gt;The Security Group assigned to WorkSpaces Pools must &lt;strong&gt;allow necessary ports&lt;/strong&gt; for WorkSpaces IP ranges. &lt;a href="https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_tutorial_setup_trust_prepare_mad.html" rel="noopener noreferrer"&gt;This&lt;/a&gt; document lists all the ports required.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  AWS Secrets Manager
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;WorkSpaces Pools require &lt;strong&gt;encrypted secrets&lt;/strong&gt; in AWS Secrets Manager. Using an unencrypted secret will cause directory configuration errors.&lt;/li&gt;
&lt;li&gt;Once a &lt;strong&gt;service account secret&lt;/strong&gt; is assigned to a WorkSpaces Pool, it &lt;strong&gt;cannot be changed&lt;/strong&gt; after directory creation.&lt;/li&gt;
&lt;li&gt;The Service Account Name secret must be domain\username. Using &lt;code&gt;/&lt;/code&gt; instead of &lt;code&gt;\&lt;/code&gt; can cause &lt;em&gt;DOMAIN_JOIN_INTERNAL_SERVICE_ERROR&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Directory Setup
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Shared&lt;/strong&gt; directories are not currently supported for use with Amazon WorkSpaces.&lt;/li&gt;
&lt;li&gt;WorkSpaces Pools Directory and Okta applications have a 1:1 relationship. If multiple WorkSpaces Pools are needed, create separate applications in Okta.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Active Directory domain name&lt;/strong&gt; in WorkSpaces Pools directory settings &lt;strong&gt;cannot be changed&lt;/strong&gt; after setup.&lt;/li&gt;
&lt;li&gt;If using Okta, &lt;strong&gt;configure Directory Integration via Okta AD Agent&lt;/strong&gt; to sync users and groups from Active Directory.&lt;/li&gt;
&lt;li&gt;If using Microsoft Entra ID, &lt;strong&gt;deploy Microsoft Entra Connect Sync&lt;/strong&gt; on a domain-joined Windows server.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Miscellaneous
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;WorkSpaces Pools use &lt;strong&gt;bundles created via WorkSpaces Personal&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Adjust &lt;strong&gt;Minimum Capacity&lt;/strong&gt; to at least &lt;code&gt;3&lt;/code&gt; to ensure sufficient available WorkSpaces.&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;CloudWatch Metrics&lt;/strong&gt; to monitor WorkSpaces Pools usage and performance.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Conclusion &amp;amp; Next Steps
&lt;/h1&gt;

&lt;p&gt;Setting up &lt;strong&gt;Amazon WorkSpaces Pools&lt;/strong&gt; with &lt;strong&gt;Okta SAML authentication and AWS Managed AD&lt;/strong&gt; provides a scalable, cost-efficient virtual desktop solution for call center agents. By leveraging &lt;strong&gt;dynamic WorkSpace allocation&lt;/strong&gt;, organizations can reduce costs while ensuring seamless agent access.&lt;/p&gt;

&lt;p&gt;Through this process, I encountered &lt;strong&gt;challenges&lt;/strong&gt;, including &lt;strong&gt;networking configurations&lt;/strong&gt;, &lt;strong&gt;Okta integration&lt;/strong&gt;, but overcoming them provided valuable insights.&lt;/p&gt;

&lt;p&gt;In the next post, I’ll cover &lt;strong&gt;how to configure FSLogix for user profile persistence&lt;/strong&gt;, ensuring a consistent experience across WorkSpaces sessions. Stay tuned!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>workspaces</category>
      <category>vdi</category>
      <category>amazonworkspaces</category>
    </item>
  </channel>
</rss>
