You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/assignments/hw5-25.md
+41-8Lines changed: 41 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,9 @@ 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
+
82
+
After setting up API Gateway, locate the API call logic in your frontend code (where it currently calls localhost). Replace the localhost URL with the API Gateway endpoint URL.
83
+
81
84
Then, coordinate with your team to make sure that invocations of `calculate` call the calculator's backend lambda code.
82
85
83
86
### 3. Use S3 and Amplify to host your frontend code
@@ -89,22 +92,51 @@ You'll be using it to host your calculator frontend code. With this you will be
89
92
90
93
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
94
92
-
To complete this part of the assignment, refer to the following AWS documentation:
95
+
Your task is to set up Amplify to host the frontend of your application. To complete this part of the assignment, refer to the following AWS documentation:
93
96
-[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.
97
97
98
98
### 4. Use Github actions to automatically deploy on each push to main
99
99
100
-
Finally, you will use a Github action to automatically:
101
-
1. Deploy your packaged backend lambda code.
102
-
2. Deploy your frontend code to S3.
103
-
3. Deploy the updates made on S3 to Amplify endpoint.
100
+
After getting hands on experience with each service , you will use a Github action to ensure that updates are deployed automatically on each commit to the main branch
101
+
102
+
The CD pipeline will perform the following tasks:
103
+
1. Deploy the packaged backend Lambda code.
104
+
2. Deploy the frontend code with the updated API endpoints to S3.
105
+
3. Trigger AWS Amplify to redeploy the frontend from S3.
104
106
105
107
In order to do this, you will need to allow Github to authenticate to AWS.
106
108
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.
107
109
110
+
Next, you will create one or more .yml files under the .github/workflows/ directory in your repository.
0 commit comments