Salesforce Decode
Salesforcedecode
Back to questions
IntegrationIntermediateawslambdaserverless

Design cross-cloud Salesforce to AWS Lambda patterns

Real World Scenario

Image processing on ContentVersion upload exceeds Apex heap limits; team proposes Lambda trigger.

Expected Answer

• Platform Event or CDC triggers middleware invoking Lambda • S3 intermediate storage for large binaries • Lambda writes result metadata back Salesforce API • IAM role least privilege Salesforce API access • Dead letter SQS for failed Lambda invocations • Cost model Lambda vs Heroku dyno for volume • Timeout alignment Lambda 15min vs Salesforce async

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Main difference: use case and scale. Platform Event or CDC triggers middleware invoking Lambda. S3 intermediate storage for large binaries. Pick based on your integration pattern and team capability. Heavy compute belongs outside Apex—Lambda pattern standard for media ML transformation. Balance speed of delivery with maintainability.

Architect Perspective

Heavy compute belongs outside Apex—Lambda pattern standard for media ML transformation.