Automation of infrastructure and application deployment for Amazon AppStream 2.0 with Terraform
Cloud native application streaming enables end users to access native applications from any device, anywhere, and any time. Amazon AppStream 2.0 service enables application vendors and organizations to simplify and accelerate their native application delivery. As the demand for this service grows, the need to fully automate the deployment gains significance. Orchestrating AppStream 2.0 end-to-end deployment involves interactions between both the infrastructure as code, and the application deployment pipelines.
This blog walks you through how to build a fully automated pipeline to provision Amazon AppStream 2.0 infrastructure and application components using Terraform. Additionally, this blog discusses how to create a customized base image that complies with the security policies of your organization.
Solution Overview
To use Amazon AppStream 2.0 to stream an application, an image builder must be provisioned first. Then the application(s) to be streamed must be installed and configured on the image builder. This image is the base for the fleet instances on which the application runs. The AppStream 2.0 stack provides the layer of abstraction between the fleet instances and the users.
The following diagram illustrates the different AppStream 2.0 components and their deployment.
At a high-level, the following are the steps to orchestrate end-to-end deployment of these components in a repeatable fashion:
- Create a customized base image by applying the appropriate security patches and hardening scripts.
- Provision the baseline Amazon AppStream 2.0 infrastructure. Create an image builder using the customized base image, fleet instances running the base image, and a stack for user access.
- Deploy the application components on the Amazon AppStream 2.0 image builder.
- Configure the application, and create a custom image.
- Re-provision the Amazon AppStream 2.0 fleet instances with the newly created image to produce a fully functional stack.
Implementation
For implementation details, check out my blog published in
https://aws.amazon.com/blogs/desktop-and-application-streaming/automation-of-infrastructure-and-application-deployment-for-amazon-appstream-2-0-with-terraform/