|
10 | 10 | You and your team have modified and tested a basic calculator app. Now, you're going to deploy that app so that anyone can access it. |
11 | 11 |
|
12 | 12 | **This is a group project**. You will work in groups to understand AWS and Github documentation, and use your understanding to set up a deployment workflow that deploys the calculator app on every push to main. This assignment is intentionally less prescriptive than prior assignments; |
13 | | -*a large component of the work is reading and understanding documentation.* |
| 13 | +*a large component of the work is reading and understanding documentation.* |
14 | 14 |
|
15 | 15 |
|
16 | 16 | ## Assignment instructions |
17 | 17 |
|
18 | 18 | In this assignment, you will use AWS to deploy your webapp. Specifically, you'll use: |
19 | 19 | - AWS lambda to run your backend code. |
20 | 20 | - API Gateway to expose your calculator API to the web. |
21 | | -- S3 to host your frontend code. |
| 21 | +- S3 to host your frontend code. |
22 | 22 | - Github actions to automatically deploy updated frontend/backend code to S3/lambda. |
23 | 23 |
|
24 | | -We'll describe each of these components in more detail next. |
| 24 | +We'll describe each of these components in more detail next. |
25 | 25 |
|
26 | 26 | ### Deliverables |
27 | 27 |
|
28 | 28 | For this assignment, each group will turn in: |
29 | | -- One paragraph on your division of responsibilities (see immediately next). |
| 29 | +- One paragraph on your division of responsibilities (see immediately next). |
30 | 30 | - A link to the production deployment of your calculator app. |
31 | 31 | - A link/links to your Github deployment workflows. |
32 | 32 | - A link to the most recent commit to main, showing that your deployment workflow has run successfully. |
@@ -78,23 +78,32 @@ You are going to create a [REST API](https://www.redhat.com/en/topics/api/what-i |
78 | 78 | This API will expose the `calculate` function. |
79 | 79 |
|
80 | 80 | Start from [this tutorial](https://docs.aws.amazon.com/lambda/latest/dg/services-apigateway-tutorial.html#services-apigateway-tutorial-api) or the AWS docs above to create a REST API that exposes `calculate`. |
81 | | -Then, coordinate with your team to make sure that invocations of `calculate` call the calculator's backend lambda code. |
| 81 | +Then, coordinate with your team to make sure that invocations of `calculate` call the calculator's backend lambda code. |
82 | 82 |
|
83 | | -### 3. Use S3 to host your frontend code |
| 83 | +### 3. Use S3 and Amplify to host your frontend code |
84 | 84 |
|
85 | 85 | [S3](https://aws.amazon.com/s3/) is cloud storage for basically anything. |
86 | | -You'll be using it to host your calculator frontend code. |
| 86 | +You'll be using it to host your calculator frontend code. With this you will be able to store the files that govern the frontend logic of your code. To deploy and expose these files at a publicly available URL endpoint, you will have to integrate this to AWS Amplify. |
87 | 87 |
|
88 | | -TODO: J+A, describe amplify and how this works, the interactions between FE and API |
| 88 | +[AWS Amplify](https://aws.amazon.com/amplify/) is a cloud-based development platform that simplifies frontend and full-stack web application deployment. In this assignment, you will use Amplify to manage deployment of the frontend of your calculator application. |
| 89 | + |
| 90 | +Amplify integrates with [Amazon S3](https://docs.aws.amazon.com/amplify/latest/userguide/hosting.html) to store and serve static assets like HTML, CSS, and JavaScript files. It provides an automated deployment pipeline that syncs with your GitHub repository and updates the frontend whenever changes are pushed to the main branch. |
| 91 | + |
| 92 | +To complete this part of the assignment, refer to the following AWS documentation: |
| 93 | +- [Getting started with Amplify hosting with S3](https://docs.aws.amazon.com/amplify/latest/userguide/deploy-website-from-s3.html) |
| 94 | +- [Using Amplify With Github](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html) |
| 95 | + |
| 96 | +Your task is to set up Amplify to host the frontend of your application, ensuring that updates are deployed automatically on each commit to the main branch. |
89 | 97 |
|
90 | 98 | ### 4. Use Github actions to automatically deploy on each push to main |
91 | 99 |
|
92 | 100 | Finally, you will use a Github action to automatically: |
93 | 101 | 1. Deploy your packaged backend lambda code. |
94 | 102 | 2. Deploy your frontend code to S3. |
| 103 | +3. Deploy the updates made on S3 to Amplify endpoint. |
95 | 104 |
|
96 | 105 | In order to do this, you will need to allow Github to authenticate to AWS. |
97 | | -Follow the [Github documentation](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions) to safely use your AWS secrets in CD. [This AWS blog post](https://aws.amazon.com/blogs/compute/using-github-actions-to-deploy-serverless-applications/) describes some (basic) best practices for generating and handling AWS authentication secrets in CI; navigate to the "Configuring AWS credentials in GitHub" section of the tutorial. |
| 106 | +Follow the [Github documentation](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions) to safely use your AWS secrets in CD. [This AWS blog post](https://aws.amazon.com/blogs/compute/using-github-actions-to-deploy-serverless-applications/) describes some (basic) best practices for generating and handling AWS authentication secrets in CI; navigate to the "Configuring AWS credentials in GitHub" section of the tutorial. |
98 | 107 |
|
99 | 108 | #### Deploying backend code |
100 | 109 |
|
|
0 commit comments