Contents

Create Elastic Beanstalk with Docker

Creating an Elastic Beanstalk Environment: 🏑

A Step-by-Step Guide πŸͺœ

  • Setting up your application on Amazon Elastic Beanstalk is a seamless process that allows for easy deployment and scaling. Follow these steps to create your environment:

Step 1: Open Elastic Beanstalk and Create Environment πŸ“­

/img/beanstalk/Create.png
follow the instruction

Step 2: Configure Environment πŸ“Š

  • Open a new page and click on the web server.

  • Provide a suitable application name, let the environment name be selected automatically, and specify the domain name.

/img/beanstalk/configure-env.png
follow the instruction

Step 3: Platform Configuration

  • Scroll down the page.

  • In the Platform section, select “Docker.”

  • Choose “Docker running on 64bit Amazon Linux 2023” as the platform branch.

  • For the application code, select “Sample application” and click Next.

/img/beanstalk/plateform.png
follow the instruction

Step 4: Configure Service Access

  • Configure the service access settings.

  • Select the appropriate options based on whether you are a first-time Elastic Beanstalk user or not.

  • Specify the EC2 key pair and choose the EC2 instance profile role.

/img/beanstalk/Configure-service.png
follow the instruction

Step 5: Networking Setup: πŸ–§

  • Select the VPC for networking.

  • Choose whether to give your EC2 instance a public IP.

  • Specify the required subnets for your EC2 instance.

/img/beanstalk/setup-networking.png
follow the instruction

Step 6: Database Configuration πŸ›’οΈ

  • Scroll down the page.

  • Configure database settings if needed.

  • Enable database, select subnets, and fill in the required details.

/img/beanstalk/databases.png
follow the instruction

Step 7: Instance and Scaling Configuration πŸ–³

  • Configure instance settings.

  • Select the root volume type and Amazon CloudWatch monitoring interval

/img/beanstalk/configure-instance.png
follow the instruction

Step 8: Security Group Selection πŸ”

  • Select the security group for the environment.
/img/beanstalk/instance-meta-data.png
follow the instruction

Step 9: βž• βž– Autoscaling πŸ“‘ Configuration πŸ–₯️πŸ–₯πŸ–₯️πŸ–₯πŸ–₯️πŸ–₯πŸ–₯️πŸ–₯πŸ–₯️πŸ–₯πŸ–₯️

  • Configure autoscaling for the environment.

  • Choose “Loadbalanced” for the environment type and set minimum and maximum instances.

/img/beanstalk/capacity.png
follow the instruction

Step 10: πŸ“πŸ“βœοΈArchitecture and πŸ–₯πŸ–₯️Instance Type: πŸ€”

  • Select the architecture (default: “s86_64”).

  • Choose the EC2 instance type.

  • AMI ID is selected automatically.

/img/beanstalk/architecture.png
follow the instruction

Step 11: Scaling Triggers 🎚️

  • Use default scaling triggers settings.
/img/beanstalk/scalling-triggers.png
follow the instruction

Step 12: Load Balancer Networking πŸ–§βš–

  • Configure load balancer settings.

  • Select visibility and subnets for the load balancer.

/img/beanstalk/loadbalancer-networking.png
follow the instruction

Step 13: Load Balancer Type and Listener 🎧

  • Select the load balancer type.

  • Add a listener if needed.

/img/beanstalk/load-type.png
follow the instruction

Step 14: Load Balancer Rules πŸ“

  • Use default load balancer rules.
/img/beanstalk/rules.png
follow the instruction

Step 15: Monitoring and Logging πŸ“ˆ

  • Open the next page.

  • Select monitoring and logging settings.

  • Choose “enhanced” for system settings and enable CloudWatch custom metrics for instances and the environment.

/img/beanstalk/Configure-updates.png
follow the instruction

Step 16: Managed Updates and SNS Notification πŸ“ŒπŸ“Œ

  • Optionally, configure managed updates and SNS notification for platform updates.
/img/beanstalk/manage-plateform-updates.png
follow the instruction

Step 17: Rolling Updates πŸ“£

  • Leave all next options as default.
/img/beanstalk/rolling-updates.png
follow the instruction

Step 18: Platform Software πŸ“€

  • Configure platform software settings.

  • Select the proxy server as “nginx” or none.

/img/beanstalk/plateform-update.png
follow the instruction

Step 19: Logs Storage on S3 πŸ“¦ 🧺

  • Configure S3 log storage settings if needed.

  • Provide credentials if required.

/img/beanstalk/S3-log-storage.png
follow the instruction

Step 20: Final Steps β›³

  • Press next.

  • Review all details carefully and press submit.

  • After creating the environment, click on “Upload and Deploy,” choose the file “project.zip,” and upload the code.

  • After successfully deploying the code, your webpage should be working.