Cost Estimate for Deploying a 3-tier Architecture
Published: 2023-04-22 14:16:24

**Challenge:** As a solution architect, you are responsible for presenting the cost of deploying the solution you designed for the client in The client has asked you to provide a cost estimate for deploying the solution in their organization for one month.

![3 Tier Arch](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qcjriobvnpxnr20ps37o.png)

## AWS Pricing Calculator

AWS Pricing Calculator is a web-based planning tool that you can use to create estimates for your AWS use cases. You can use it to model your solutions before building them, explore the AWS service price points, and review the calculations behind your estimates. You can use it to help you plan how you spend, find cost saving opportunities, and make informed decisions when using Amazon Web Services.

With AWS Pricing Calculator, you can do the following tasks:

- View transparent prices  
- Use groups for hierarchical estimates 
- Share your estimates
- Export your estimate

## My Pricing
* EC2 Instance Pricing Model

The pricing for EC2 instances is based on several factors:
 **EC2 instances:**
- Tenancy
- operating system
- instance type
- Number of EC2 instances

**Workloads**
- Constant usage
- Daily spike
- Weekly spike
- Monthly spike
- Pricing options

Other factors that determine cost would be
- **The On-Demand:** you pay for compute capacity by the hour or the second depending on which instances you run. 
- **The Reserved Instances:** This is flexible pricing model that offers low prices on EC2 usage, in exchange for a commitment to a consistent amount of usage (measured in $/hour) for a one- or three-year term.
- **The Spot Instances:** Amazon EC2 Spot instances allow you to request spare Amazon EC2 computing capacity for up to 90% off the On-Demand price

 
### My EC2 Pricing

The configuration was done on:
- Shared Tenancy
- Linux OS
- 4 EC2 instances, 2 for Web App and 2 for Application
- t3.medium instance
- 1 year reserved instance with no upfront payment

![EC2 Pricing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/22e2ccuzbzrqnahuj4q8.png)

## RDS MySQL

The AWS pricing is similar to that of EC2 instances:
- Instance Type: 
- Database Engine: 
- Region: 
- Storage: 
- Data Transfer: 

Also same with EC2 instance, they have pricing based on;
- The On-Demand
- Reserved Instances 
- Provisioned IOPS 

### My RDS Pricing

The RDS configuration was done on:
- General Purpose SSD (gp2) storage of 100 GB
- db.t4g.medium instance type
- On demand utilization
- Multi-AZ deployment
- backup storage of 500 GB

![RDS Pricing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ny9bzttnphpztursyxp.png)

## Other Pricing Considerations

- **Auto Scaling:** 
Auto Scaling allows you to automatically scale your EC2 instances based on demand. The cost of auto scaling is determined by how many instances are started or stopped, as well as how many hours they are running. Although using Auto Scaling is free, you will still be charged for the underlying EC2 instances that are launched.

- **Elastic IP:** 
An EC2 instance or an RDS instance may be connected using an Elastic IP address, which is a static, public IP address. Elastic IP address costs vary depending on whether or not the address is in use. There is no fee if the elastic IP address is linked to an active instance. However, you will be charged a tiny hourly fee if the address is not associated to an active instance.

- **Elastic Load Balancer (ELB):** 
An ELB is a load balancing service that distributes incoming traffic across multiple EC2 instances. The cost of ELB is determined by the volume of data moved into and out of the ELB, the number of active connections, and the number of hours the ELB is operational. 

## Final Estimate

Using the Pricing calculator the final estimate was $341.22 monthly and $4,094.64 Yearly

Find the link for my estimate 
https://calculator.aws/#/estimate?id=8a835255b924328d5d739616f21ab352a7193edf 

![Final Estimate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmxozb27fixhrzy626np.png)

Note: The pricing listed above is predicated on the premise that the architecture will be operational 24 hours a day, seven days a week. The real cost may differ depending on consumption patterns and other variables. Furthermore, this report only includes the cost of the specified AWS services and excludes any additional expenditures such as data transfer, storage, or other services that may be necessary for the  architecture.