- Newest
- Most votes
- Most comments
There are a few issues with your configuration that could be causing the errors you're experiencing:
-
In your IAM policy, there's a case sensitivity issue. The condition should be "appstream:userId" (with a lowercase 'd') instead of "appstream:userID" (with an uppercase 'D'). This mismatch could be causing the "INVALID_AUTH_POLICY" error.
-
When removing the specific stack from the relay state URL, you need to ensure that your IdP is properly configured to handle multiple stacks. Without specifying a stack in the relay state, AppStream 2.0 needs another way to determine which stack to present to the user.
For a multi-stack configuration, you have two main options:
Option 1: Create separate applications in your IdP (Entra ID) for each stack, each with its own relay state URL pointing to a specific stack. This gives users the ability to choose which application/stack they want to access.
Option 2: Keep a single application but implement a catalog selection page. For this to work, you need to:
- Keep the relay state without a specific stack as you've done
- Ensure your IAM policy correctly grants access to all stacks (with the correct case for userId)
- Configure your stacks to be visible in the catalog
If you're still experiencing issues after fixing the case sensitivity in your policy, you might want to check:
- That all stacks are properly configured and in the "Running" state
- That the user attributes in SAML are being passed correctly
- That there are no additional conditions in your trust policy that might be causing authentication failures
For disaster recovery or geographic distribution purposes, you can also set up multiple stacks across different regions and control access through the relay state URL or by configuring multiple applications in your IdP.
Sources
AppStream 2.0 Unable to authorize the session. (Error Code: INVALID_AUTH_POLICY);Status Code:401 | AWS re:Post
Disaster recovery - Best Practices for Deploying Amazon AppStream 2.0
answered 10 months ago
Relevant content
asked 5 years ago
asked 3 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 9 months ago

I would prefer if my user only have one Enterprise application to access both stacks. I did modify appstream:userID to appstream:userId, but still encounter the same error. For the step where you mention :
Configure your stacks to be visible in the catalogwhere do I configure this ? All the fleet under my stacks are currently up and running.