Deploy an Astro v3.6.1 app on AWS Amplify (GLIBC_2.27 or GLIBC_2.28 not found on build :bug fix)
Published: 2023-11-28 12:20:11

---
title: Deploy an Astro v3.6.1 app on AWS Amplify (GLIBC_2.27 or GLIBC_2.28 not found on build :bug fix)
published: true
description: The aim is to create and host an Astro v3.6.1 application on AWS Amplify.

tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-11-28 07:55 +0000
---
*Why Astro?*
Astro is an all-in-one web framework for building fast, content-focused websites. It is really good for SEO especially as it is lightning-fast website performance, making it ideal for modern web applications and static websites.

*AWS Amplify*
AWS Amplify is a fully managed CI/CD and hosting service that is perfect for web applications. 

Key Points:
-Fully Managed CI/CD: Amplify takes care of the complexities of the CI/CD pipeline, allowing developers to focus on building and refining their applications.
-Hosting Excellence: With AWS Amplify, hosting becomes a breeze, ensuring your web applications are readily available to users.

**Prerequisite:** 
1st create an auto app on your local machine.
Use this tutorial to create your 1st astro app: 
Link: https://docs.astro.build/en/tutorial/1-setup/2/

Once it is on your Github we can now set it up on AWS Amplify.
This will done by creating a CI/CD pipeline from GitHub to AWS Amplify where the app will be deployed. 


**Deploy to AWS:**

1. Log in to AWS and navigate to Amplify in the N. Virginia region or any other region you like.
2. Click "Get Started" and select "Host your web app" as demonstrated.: 
![AWS Amplify Console](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rbum0gtkjglhref4td2q.png)
3. Click on Get Started & click on Host your web app.
4. Choose GitHub and install AWS Amplify (us-east-1)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lzyx40d31sy2ln074qg3.png)
5. You'll be redirected to a page to install and authorize AWS Amplify on GitHub. Select the GitHub repository for your Astro app.
Mine is https://github.com/OrinaOisera/Astro_app
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b9ltind9qoi6ow8epl46.png)
6. After successful authorization, choose the branch (e.g., master) and proceed by clicking "Next." 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/breinjgw7otoas7e88t8.png)
7. Navigate to the app build and test settings.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0np25xgn4c1fm3kwa9aq.png)
8. Scroll down to the advanced settings, locate "Live Package Update," and update the Node.js version to 20.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aqf6qjmdy92cjd0scrfu.png)
9. Save your changes and initiate the deployment.
10. Expect the build to fail.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8jrbn76wmrd5zls70abj.png)
11.Click on "Build," leading you to the build logs, where you'll identify an issue related to Node.js version compatibility.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g5fjtvr223eca6b9d1jo.png)
Astro v 3 require Node js 18 and AWS amplify fail to build due to version `GLIBC_2.27' not found (required by node) Is because the Linux version is not the latest one.  
12. In the sidebar, go to build settings and scroll to "Build Image Settings."
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sdwgol98jil3bkds85z2.png)
Build an image is Amazon Linux default  
13. Update "Build an image" from "Amazon Linux default" to "Amazon Linux:2023," and save the changes.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b3iyhv5ejeu92izyp1wc.png)
14. Scroll back up and click "Redeploy this version" on the top right.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/litgnhxgps26a0vo9lsi.png)
15. Verify that the deployment is successful & Click the  URL to preview the website.