Adsense ad-unit

AWS Pricing

AWS offers pay-as-you-go / pay-per-use pricing

 3 fundamental drivers of cost with AWS: compute, storage & outbound data transfer. For most cases, no charges for inbound data transfer OR transfer between other AWS services in the same region.

  • compute resources are charged by hourly from launch until termination (except for reserved instances, where charges are prefixed)
  • data transfer charges are aggregated  across services, charged at outbound transfer rate
  • data storage costs - per GB
  • VAT, sales tax, other applicable taxes & duties are all extra charges
Purchase options available are:
  1. reserved instances / reserved capacity - 60-75% cheaper than on-demand pricing
  2. savings plans - flexible pricing model with a commitment to consistent usage (in $/hr) for 1-3 yr term
  3. on-demand capacity - compute or storage capacity used by hr / sec (min 60 secs)
  4. spot pricing - price varies by demand, substantial discounts possible in comparison with on-demand pricing

 Options to pay:

  • pay-as-you-go
  • save when you reserve (reserved instances)
  • volume based discounts (pay less by using more)

Reserved instances / capacity provides best discounts. Customers who have a fair knowledge of their capacity requirements on a longer duration get the best prices.

Among reserved instances, available payment options are:

  1. All upfront - one upfront payment which provides largest discount
  2. Partial upfront - low upfront payment & discounted hourly rate for the instance duration / reserved instance term
  3. No upfront option - discounted hourly rate for the instance duration / reserved instance term

For a new account, free tier is offered for 12 months. Estimate monthly bill using - AWS pricing calculator, helpful for budgeting & cost analysis. Migration evaluator is a complementary service for data-driven business use cases - migrate from on-premise to cloud.

 

Factors to consider, estimating costs for AWS services

  • AWS EC2 costs - clock hours of server time, instance type, pricing model, # instances, load balancers (if used), detailed monitoring (over & above basic monitoring with cloud watch), auto-scaling
  • AWS lambda pricing - 1 million requests / month in free-tier, $0.20 per million requests thereafter; 400,000 GB-seconds per month free
  • AWS elastic block store - SSD backed & HDD volumes are priced by consumption per month, until the storage is released (this includes snapshot volumes as well). Inbound data transfer in free, while outbound data transfers are charged by tiers.
  • AWS S3 - costs depends on storage class (standard IA, one-zone IA, glacier or deep archive), # of objects, requests for data retrieval, data transfers cross-regions, storage management features
  • AWS outputs - services running on AWS outposts are charged by usage. Operating system charges are billed by usage as an uplift to cover the license fee
  • AWS Snowcone / Snowball / Snowmobile - costs by usage & amount of data transferred
  • AWS RDS costs - clock hours of server time, database purchase type, characteristics, # of DB instances, provisioned storage, additional storage, long-term retention for archival, # API requests to database, read replicas / DB copies across AZs, data transfer costs
  • AWS Dynamo DB - on-demand capacity & provisioned capacity; strongly-consistent or eventually consistent or transactional reads; # read-request-units (RRU) & # write-request-units (WRU). Examples:
  • strongly consistent reads with data size up to 4KB require 1 RRU
  • data > 4KB with strongly consistent read requires >1 RRU
  • eventually consistent read requires 1/2 RRU
  • transactional read request requires 2 RRUs
  • transactional write request requires 1 WRU up to 1 KB
  • strongly consistent read request of an 8 KB item requires 2 RRUs
  • write request of a 3 KB item requires 3 WRUs
  • transactional write request of a 3 KB item requires 6 WRUs
  • Global tables - charges are usage based on resources consumed on each replica table. Adding table replicas across regions incurs charges for outbound data transfer
  • AWS Cloudfront - data transfers out, HTTP(s) requests, invalidation requests, field-level encryption requirements, dedicated IPs
  • AWS Kendra, Macie - priced based on consumption, for enterprise licenses
  • AWS Direct Connect & APS VPN - allows establish dedicated, secure connections to private / on-premise networks; data transfer costs are charged on consumption basis between AWS network & private network
  • VPC endpoints - allow connectivity between private subnet into public subnet, within the AWS network; VPC endpoints can be used to reduce public data transfer costs & NAT gateways' costs
    • interface VPC endpoints - are provided by AWS PrivateLink, have an hourly fee & per GB usage cost
    • gateway VPC endpoints - have no usage costs; support S3 & Dynamo DB
 
Rule of thumb for cost optimization:
  • delete unassociated EBS volumes
  • dissociate unused EIPs
  • delete older EBS snapshots
  • leverage S3 object expiration

Cost Optimization Techniques

  • Identify RDS / Redshift instances with low utilization & reduce costs by stopping (RDS) / pausing (redshift)
  • Cost optimization - cost comparison, evaluate best options to scale horizontally or vertically 
    • choose the best pricing model
    • evaluate the services required
    • evaluate networking requirements to understand the associated cost
    • use cost evaluators & calculators to pre-determine / budget for cloud resources
    • monitor usage, set alarms / alerts using cloud watch, setup cloud trail to view trial of events
    • analyze & optimize resource usage and determine next steps to refine the solution
    • Appropriate provisioning - provision what's required to run and nothing more
      • consolidate resources where possible
      • use Cloudwatch to monitor resource utilization
    • Right sizing - in terms of costing, use lowest-cost resource that meets technical specs
      • loosely coupled architecture - SNS, SQS, lambda & dynamo DB can smoothen demand, create more predictability & consistency
    • Evaluate purchase options & select an appropriate geography that would work out best - satisfying non-functional attributes (NFRs); with cost optimization
  • Optimize costs for data transfer - specifically outbound / inbound data outside of AWS private network
    • go with data-driven approach for sizing ur instances
    • go by the supply & demand, setup for the "right size"
    • use appropriate resources & configurations
    • measure efficiency constantly
    • select servers closer to your geography
    • default to managed services
    • for certain cases, Direct Connect may be a cost effective option for the given data volume & speed
  • Identify EBS volumes with low usage; snapshot / delete such volumes
    • choose appropriate storage tiers (for S3), thereby reduce costs
    • reduce costs by deleting idle load-balancers
    • TAG AWS RESOURCES - implement a governance model to optimize cost
  • Managed services
    • use of managed services to lower cost as against "custom services", with certain TCO (total cost of ownership)
    • managed services provide less management complexity & manual intervention
    • e.g. RDS, Fargate, Redshift, EMR, which provide push-button ease converting traditional complex & difficult installations

Cost calculation examples from AWS.


Sources:

  1. https://docs.aws.amazon.com/whitepapers/latest/how-aws-pricing-works/welcome.html
  2. https://aws.amazon.com/pricing/
  3. https://tutorialsdojo.com/aws-cheat-sheets/

No comments:

Post a Comment

Adsense ad-unit

Featured posts

Why Cloud Adoption...What are the necessary steps needed to migrate onto cloud

Cloud services offered by different cloud providers have grown exponentially in recent years. Cloud adoption work for start-ups, small &...