Cost - Dynamic Image Transformation for Amazon CloudFront

Cost

The cost for running this solution varies between the two deployment architectures. Choose the architecture that best balances your performance requirements with cost considerations.

We recommend creating a budget through AWS Cost Explorer to help manage costs. Prices are subject to change. For full details, see the pricing webpage for each AWS service used in this solution.

Dynamic Image Transformation for Amazon CloudFront uses CloudFront’s pay-as-you-go pricing model by default. Depending on your expected traffic, you may be able to optimize costs by switching to CloudFront’s fixed-pricing model. Before deployment, evaluate your expected workload including monthly data transfer volume and image request count against CloudFront’s pricing models to determine which option provides the best value for your specific use case.

To switch to these tiers after deployment, navigate to the CloudFront console, select your CloudFront distribution, under the Billing section click "Switch to a plan" and select one of the available fixed pricing plans.

The pricing estimates below reflect costs when using the fixed-pricing tiers.

For detailed CloudFront pricing information, including pay-as-you-go rates and fixed-pricing tier benefits, visit the [CloudFront Pricing page](https://aws.amazon.com/cloudfront/pricing/).

Lambda architecture costs

You are responsible for the cost of the AWS services used while running the Lambda architecture. The below table gives the breakdown of costs for different workload sizes.

Assumptions

  • 90% cache hit rate

  • Average image size: 45 KB

  • 350 ms processing time per image

AWS service 10M images served 125M images served 500M images served

Amazon API Gateway

$1.00

$13.00

$50.00

AWS Lambda

$0.93

$12.08

$46.46

Amazon CloudFront

$200.00

$200.00

$1000.00

Amazon S3

$0.40

$5.00

$20.00

Amazon CloudWatch

$1.15

$19.17

$75.67

Total

$203.48

$249.25

$1192.13

ECS architecture costs

The ECS architecture has higher baseline costs due to always-running infrastructure but provides better performance and advanced features. Costs scale with the selected t-shirt size and auto-scaling configuration.

ECS architecture cost summary

Dynamic Image Transformation for Amazon CloudFront uses CloudFront’s pay-as-you-go pricing model by default. However, if you expect your monthly usage on your distribution to be below 50TB of data transfer and 500M image requests, you can optimize costs by switching to CloudFront’s Business or Premium fixed-pricing tiers after deployment.

To switch to these tiers after deployment, navigate to the CloudFront console, select your CloudFront distribution, under the Billing section click "Switch to a plan" and select one of the available fixed pricing plans.

The pricing estimates below reflect costs when using the fixed-pricing tiers.

For detailed CloudFront pricing information, including pay-as-you-go rates and fixed-pricing tier benefits, visit the [CloudFront Pricing page](https://aws.amazon.com/cloudfront/pricing/).

ECS architecture cost breakdown

The following table provides sample cost breakdowns for different ECS deployment sizes in the US East (N. Virginia) Region for one month.

Assumptions

  • 90% cache hit rate

  • Average image size: 45 KB

  • ALB configuration is Small, Medium and Large for the corresponding workloads

  • Actual cost might vary based on burst traffic patterns

AWS Service 10M images served(Small deployment size) 125M images served(Medium deployment size) 500M images served(Large deployment size)

Amazon CloudFront

$200

$200

$1000

AWS ECS

$72.08

$216.24

$576.64

Application Load Balancer

$16.79

$22.27

$34.30

CloudWatch Logs

$1.15

$19.17

$75.67

Total

$290.02

$457.68

$1686.61

Cost considerations

Cost Considerations: Lambda architecture incurs AWS Secrets Manager costs only when image URL signature feature is activated, and operational dashboard usage may fall under CloudWatch free tier. ECS architecture costs reflect continuous operation with minimum task counts, with auto-scaling increasing costs during high-traffic periods, and DynamoDB costs based on typical usage patterns. Additional costs may include Amazon S3 PUT/GET requests depending on caching effectiveness, Amazon Rekognition charges for smart cropping or content moderation features, external origin data transfer costs, and negligible Cognito costs for Admin UI authentication (typically under $1/month for single-user operation).

The operational dashboard included with the solution may fall under the free tier, refer to CloudWatch pricing for the most up to date pricing information. For information on how to disable the deployment of the operational dashboard, refer to Optional Mappings.

Demo UI

If you choose to deploy the demo UI, the solution automatically deploys an additional CloudFront distribution and S3 bucket for storing the static website assets in your account. You are responsible for the incurred variable charges from these services. For more information, see Amazon S3 pricing.

Image modification and analysis

This cost estimate doesn’t account for Amazon S3 PUT and GET requests, which can vary because modified images are cached in CloudFront, and because certain use cases require special-use capabilities such as smart cropping and content moderation with Amazon Rekognition. Using Amazon Rekognition features may incur additional charges. For more information, see Amazon Rekognition pricing.

There is no additional cost for using sharp, which is an open source library.