Lambda, SNS, SQS, CloudWatch, and KMS usage contribute to your AWS infrastructure
cost. This page shows some of the infrastructure costs.
Parameters used for calculations
-
1 Region: us-east-1
-
Monthly File Volume
-
1,900 files/hour × 24 hours/day × 30 days/month = 1,368,000 files/month
-
-
Monthly Total Data Volume
-
1,368,000 files × 2 MB/file = 2,736,000 MB = 2,736 GB = 2.67 TB
-
Lambda cost summary
|
Usage per month
|
Pricing per unit
|
Cost per month
|
|
|
Total Invocations
|
4,112,640 requests
|
$0.20 per 1M requests
|
4,112,640 × $0.20 / 1,000,000 = $0.822528
|
|
x86-64 Compute
|
1,628,553.38 GB-seconds
|
$0.0000166667 for every GB-second
|
Compute Charges: 1,628,553.38 × $0.0000166667 = $27.14
|
|
arm64 Compute
|
217,704.13 GB-seconds
|
$0.0000133334 for every GB-second
|
Compute Charges: 217,704.13 × $0.0000133334 = $2.90
|
|
Monthly Total Cost
|
$30.05
|
||
|
Average Cost per file
|
$30.05 / 1,368,000 files = $0.00002196637
|
||
CloudWatch logs
|
Usage
|
Cost
|
|
|
Collect (Data Ingestion) Cost
|
Monthly ingestion: 1GB
Price: $0.50 per GB
|
1 GB × $0.50 = $0.5/month
|
|
Store (Archival) Cost
|
Storage (90-day retention): 3 GB
Price: $0.03 per GB-month
|
3 GB × $0.03 = $0.09/month
|
|
Total
|
$0.59/month
|
SQS
-
ScannerQueue
-
EventForwarderQueue
The following calculations apply to the two queues listed above, assuming a 99.99%
success rate.
Main Scanning Flow:
-
FilterEventLambda → ScannerQueue- 1 SendMessage request- 1 ReceiveMessage request (ScannerLambda reads
BatchSize=1)- 1 DeleteMessage request (after processing) -
ScannerLambda → SNS → EventForwarderQueue- 1 SendMessage request (automatically sent via SNS subscription)- 1 ReceiveMessage request (EventForwarderLambda reads,
BatchSize=9000)- 1 DeleteMessage request
|
AWS SQS Standard Queue Pricing (us-east-1)
|
|
|
Free tier
|
1 million requests per month
|
|
From 1 Million to 100 Billion Requests/Month
|
$0.40 (per Million requests)
|
Cost Calculation
Requests per hour: 24823
Requests per day: 24823 × 24 = 595752
Requests per month: 595752 × 30 = 17872560
Monthly Total SQS Cost : (17872560 ÷ 1,000,000) × $0.40 ≈ $ 7.15
SNS
|
Service type
|
Unit
|
Price
|
|
Publish Requests
|
Per 1 million requests
|
$0.50
|
|
Notifications to Lambda
|
Per notification
|
$0.00 (Included in Lambda invoke cost)
|
|
Notifications to SQS (Same Region)
|
Per notification
|
$0.00 (Free)
|
|
Data Transfer (Same Region)
|
Per GB
|
$0.00 (Free)
|
Publish request costs
Assume each scanned file triggers exactly 1 publish request to SNS.
|
Item
|
Quantity
|
Unit price
|
Calculation
|
Subtotal
|
|
SNS Publish Request
|
1,368,000
|
$0.50 per 1 million requests
|
1,368,000 ÷ 1,000,000 × $0.5
|
$0.684
|
Total Monthly SNS Cost $0.68
Cost per File $0.68 ÷ 1,368,000 = $0.00000049
S3 cost
Quarantine feature enabled with all 3 buckets (CleanBucket, FailureBucket, QuarantineBucket)
-
100% of files are moved to destination buckets:
-
Clean files → CleanBucket 90%
-
Malicious files → QuarantineBucket 5%
-
Scan failures → FailureBucket 5%
-
-
PostScanActionLambda performs Copy, Delete, Put operations
-
Data transfer may incur additional costs
|
No quarantine feature enabled (scan and tagging only)
|
Quarantine feature enabled, buckets are in the same region
|
Quarantine feature enabled, buckets are in different regions
|
|
$1.1
|
$1.1 +
10% files move
$ 1.423/ month
= $2.523/month
|
$1.1 +
10% files move
$ 1.423/ month +
10% cross-region transfer: $5.472/month
= $ 7.995/month ≈ $8/month
|
|
$1.1 +
100% files move
API Request Cost
$14.23/ month
= $15.33/month
|
$1.1 +
100% files move
$14.23/ month+
100% file cross-region transfer $54.72/month
= $70.05/month
|
KMS
Customer-Managed KMS Key for Lambda Functions
|
Lambda
|
KMS operations
|
Description
|
|
ScannerLambda
|
kms:Decrypt
|
Reads and scans encrypted files
|
|
PostScanActionLambda
|
kms:Decrypt + kms:GenerateDataKey
|
Reads files and writes to the target bucket (if moved)
|
KMS Pricing
-
Customer-managed KMS key
-
API requests: $0.03 per 10,000 requests
-
Free tier: None (only AWS-managed keys include 20,000 free requests)
-
Assumptions
-
Monthly uploads: 1,900 × 24 × 30 = 1,368,000 files
-
Source bucket: Encrypted with SSE-KMS
-
Target buckets: Encrypted with SSE-KMS (quarantine/clean/failure)
|
Scenario
|
KMS Requests/Month
|
Request Cost
|
|
Scan Only (no move)
|
1,368,000
|
$4.10
|
|
Scan + 10% Move
|
1,641,600
|
$4.92
|
|
Scan + 100% Move
|
4,104,000
|
$12.31
|
Summary
|
Resource
|
On-demand cost
|
Free tier savings
|
|
Lambda
|
$30.05/month
|
-$6.51/month
|
|
CloudWatch logs
|
$0.59/month
|
-$0.59/month
|
|
SQS
|
$7.15/month
|
-$0.4/month
|
|
SNS
|
$0.68/month
|
-$0.5/month
|
|
S3
|
|
-
|
|
KMS
|
|
-
|
|
EventBridge
|
AWS Free Tier: AWS management events are ingested by the event bus for free.
|
|
|
Total
|
|
|
Cost estimates with KMS fees
Customer-managed KMS key has been set (includes KMS API call costs)
|
Average files scanned
|
Average file size
|
Post-scan action
|
Average infrastructure cost per file
|
|
|
$43.67/month
|
1,368,000 files/month
|
2 MB
|
|
$0.00003192251 per file scan
|
|
$45.91/month
|
1,368,000 files/month
|
2 MB
|
|
$0.00003355994 per file
|
|
$51.39/month
|
1,368,000 files/month
|
2 MB
|
|
$0.00003756578 per file scan
|
|
$66.11/month
|
1,368,000 files/month
|
2 MB
|
|
$0.00004832602 per file scan
|
|
$120.83/month
|
1,368,000 files/month
|
2 MB
|
|
$0.00008832602 per file scan
|
Cost estimates without KMS Fees
|
Average files scanned
|
Average file size
|
Post-scan action
|
Average infrastructure cost per file
|
|
|
$39.57/month
|
1,368,000 files/month
|
2 MB
|
|
$0.00002892543 per file scan
|
|
$40.99/month
|
1,368,000 files/month
|
2 MB
|
|
$0.00002996345 per file
|
|
$46.47/month
|
1,368,000 files/month
|
2 MB
|
|
$0.00003396929 per file scan
|
|
$53.8/month
|
1,368,000 files/month
|
2 MB
|
|
$0.00003932748 per file scan
|
|
$108.52/month
|
1,368,000 files/month
|
2 MB
|
|
$0.00007932748 per file scan
|
