How to deploy a React application to Amazon S3 using GitLab CI/CD
Mar 1, 2023Jeremy Wagner

Summary
This post details the technical steps for deploying a React application to Amazon S3 using GitLab CI/CD. It covers configuring an S3 bucket for static website hosting, setting up public read permissions, manually building and uploading the React app, and configuring AWS IAM OIDC for secure credential retrieval from GitLab CI. The CI/CD pipeline uses temporary AWS credentials obtained via OIDC to upload the built application to S3.
More from the Static Website Hosting with GitLab Pages trail
- Build a new website in a few easy steps with GitLab Pages
- GitLab Pages features review apps and multiple website deployment
- How to host VueJS apps using GitLab Pages
- Use GitLab and MITRE ATT&CK Navigator to visualize adversary techniques
- Monitor your web attack surface with GitLab CI/CD and GitLab Pages