Automating the deployment
As discussed in the previous section, serverless offerings such as AWS Lambda and S3 abstract the operating system configuration away. Therefore, when we deploy, we simply need an application package that is compatible with the target platform. In this section, we’ll create an automation pipeline using GitHub Actions to provision our application to its new serverless home in AWS.
Terraform
The first thing that we need to do is to provision our environment to AWS. This is going to be extremely similar to the way we did this in the previous chapters. In Chapter 7, we needed to ensure that our VM images were built and available before we executed Terraform because the Terraform code base referenced the VM images when it provisioned the VMs. With our VM architecture, application deployment happens before Terraform provisions the environment:
Figure 9.10 – Packer-produced VM images are a prerequisite for Terraform
...