title: Cost for DynamoDB read and write for 8 million records per hour and Copy to Redshift
body: <p><strong>Can some please help me in this calculation. Is this the way we calculate for pricing ?</strong></p>
  
  <p>We have a stream which creates an average of 8 million records/ hour (2500 records/second) and we want to insert into DynamoDB using aws Lambda.</p>
  
  <p>Each records have max of 450 Bytes in size.
  What I understand is for less than 1 KB , Dynamodb takes 1 Write capacity unit. So for 2500 records / second we need 2500 Write capacity unit.</p>
  
  <p>Data get inserted to DynamoDB in real time.
  For analysis purpose , we need the same data to be in Redshift as well. So every 15 minutes we need to sync Dynamodb table to Redshift table. Business want to do Analytics on top Redshift cluster only. </p>
  
  <p>To do a copy data from DynamoDB to redshift using <strong>redshift COPY</strong> command in 15 minutes I need approximate 10000 Read capacity unit.</p>
  
  <p>For doing this it will cost approx USD 2400/month </p>
  
  <hr>
  
  <p>More info</p>
  
  <p>Existing architecutre </p>
  
  <p><strong>S3 => Lambda => Redshift</strong> : This works fine till lambda , when it comes to redshift , jobs are getting into Queue, and other Jobs are getting delayed. So we checked with Amazon Tech support : They clearly mention , for real time or near real time Injection , Redshift is not a good choose. Instead of Lambda we use EMR clusster , created manifest file ( adding multiple files)  and did a redshift copy - Still the result was satisfied. Business dint want to increase the cluster right now. </p>
  
  <p><strong>Proposed architecture</strong> </p>
  
  <p><strong>S3 => Lambda => DynamoDB (as soon as file Landed )=> Every 15 miutes => Query data from Dynamo DB and Save to S3 => Redshift</strong> </p>
  
  <p>The ask from business is how much cost is 
  Every 15 minutes we are querying Dynamodb data with record count of 4 million .
  Save it to S3
  Do a Redshfit Copy with that S3.</p>
  
  <p>If I give a read unit as 10,000 - can the read from Dynamodb(4.5 million) completes in 7 minutes</p>
  
  <p>10000 * 60(seconds) = 6,00,000 records</p>
  
  <p>6,00,000 * 7 minutes = 4.2 million </p>
  
  <p>My calculation is</p>
  
  <p>7 minutes to read from Dynamo DB</p>
  
  <p>3 minutes to write to S3</p>
  
  <p>3 minutes to do redshift COPY </p>
  
  <p>In short Business needs the data to be in Dynamodb as soon as file landed in S3.
  They can wait 15 minutes to reflect in Redshift.</p>
  
  <p>Any other suggestion on this</p>