Compiling the Application
In order to compile the application, select Compile
from the Action
menu. After confirming the action, you should see this dialog.
=== จะเปลี่ยนรูป ===
Clicking on the link, you will download the deployment package for the project. It should look something like this in your file finder:
Unzip it to have a look inside at the anatomy of a deployment package:
The deployment package is a .zip file, and it contains another .zip file in turn, along with a CloudFormation template (.json file). First let’s unzip the secondary .zip file. It contains a /bin/
directory that holds an executable:
Although the extension on this file is .exe
, it is in fact a Linux executable (ELF). We adopt this convention of file naming in order to be able to identify file types from their extensions; the extension of an executable makes no difference to Linux. This executable is the Lambda function of the Polly
application. It is compiled from the dataflow circuits of the Coreograph project and uses our custom runtime.
Now open the CloudFormation template (.json) file in your favorite text editor. The first section of the file is Parameters
, and this CloudformationTemplate has two: CGDeploymentBucket
and CGDeploymentPath
.
These two parameters are important when manually deploying one of our deployment packages to your AWS account. You will be prompted for their values when launching this CloudFormation template as a CloudFormation stack. They tell CloudFormation where to find the files that belong to your deployment package, in this case, the Lambda executable we saw above. We will see how those parameters can be provided to CloudFormation in the course of uploading and launching the application, below.
If you scan to the end of the .json file, you will see an Output
section:
When the CloudFormation stack is launched, it will provide the URL of the API endpoint it creates. We have provided a simple front end (web page) to exercise this API, hosted in our own AWS account, but in order to cause that front end to access your new API running in your AWS account, you must tell the front end where your API is. That’s the purpose of this output parameter. We will see how this URL can be retrieved in the course of uploading and launching the application below.