Script a custom AWS AppStream image
Scenario
Lets script a custom aws appstream image
A customer wanted to setup AWS AppStream 2.0 Image Automation for their AppStream image creation especially as there were situations where two or more images were potentially required including monthly updates (minimum) so they needed a repeatable, consistent solution for this.
Solution
You can only automate this so far within the current AppStream 2.0 limitations.
Creation of the image builders, the builder image itself, creation or the fleets and stacks then based on this image.
Short of joining your image builder to a domain that launches a script at computer startup – there is no immediate way to call a ‘zero touch build’ for AppStream images, and no current way to automate the Image Builder test and optimize wizard (the wizard you run to seal and snapshot the image)
Things to Consider Scripting / Adding
- IEES Disable for all users
- Local Timezone and Regional Settings (particularly if outside the US and your regional settings are not available for selection from the End User interface) (for example UK English and Timezone)
Set-WinSystemLocale en-gb Set-Culture en-GB Set-WinSystemLocale en-GB Set-Timezone "GMT Standard Time"
- If your images wont be domain joined then
- Create a login script to apply user settings at ‘login’
- If you manipulate local Group Policy (gpedit.msc) use the microsoft tool LGPO.exe to backup and restore the settings easily
- You can publish Windows Explorer in the Image Assistanc via a batchfile with content
cd %userprofile%\my files\temporary files -Force start .
Examples
You can automate the image builder application injection using sqlite.exe per below
example.sql file to pass into C:\ProgramData\Amazon\Photon\PhotonAppCatalog.sqlite
INSERT INTO Applications (Name, AbsolutePath, DisplayName, IconFilePath, LaunchParameters) VALUES (“My Intranet Website”, “C:\Program Files (x86)\internet explorer\iexplorer.exe”, “Intranet”, “C:\ProgramData\Amazon\Photon\AppCatalogHelper\AppIcons\ie.png”, “https://www.myintranet.org.uk”)
Any questions or comments get in touch using the social media links at the top of the website and we will do out best to help! 😉