Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

     

CI/CD Pipeline for Amazon EC2

Architecture Diagram
Architecture Diagram

Step 1 - Create an Amazon Linux ec2 instance.

Image description

Step 2 - Create an EC2 instance role and attach it to the EC2 instance.

Image description
Image description

Step 3 - Create a GitHub connection for the Amazon CodePipeline.
Image description

Step 4 - Copy files to your GitHub account. You can get it from my repo. Also, you can easily fork the repository.

Repository Link

Step 5 - Connect to the EC2 instance and configure it as a web server by installing httpd.

sudo su -yum install httpd -yservice httpd startchkconfig httpd oncd /var/www/html/ # Check location
Enter fullscreen modeExit fullscreen mode

Step 6 - Create CodePipeline

Image description

Image description

Amazon CodePipeline service role with full SSM access.

Image description

Image description

Skip Build and Test Stages

Image description

Image description

Step 7 - ClickNext to review, then click theCreate Pipeline button.

Image description

Step 8 - Add a new version of your website. Commit to github. AWS CodePipeline automatically triggered the pipeline.

Image description

Image description

Copy the EC2 instance public IP and paste it into a web browser. You can see your website's latest version is visible.

Image description

Clean Up

  • Delete CodePipeline.
  • Terminate EC2 Instance.
  • Remove IAM Roles.

Thanks for reading the Article.

Connect with me
LinkedInhttps://www.linkedin.com/in/lasanthasilva
Twitterhttps://twitter.com/LasanthaSilva96

Top comments(1)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
jatinmehrotra profile image
Jatin Mehrotra
CB for 3 years. Will update with a better bio !!!

Good blog I also covered this heredev.to/aws-builders/simplify-your-...

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Build On!

Would you like to become an AWS Community Builder? Learn more about the program and apply to join when applications are open next.

More fromAWS Community Builders

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp