Hybrid architectures are common when Salesforce alone isn't enough.
Roles:
Salesforce — system of engagement.
- CRM workflows, Service, Sales.
- Lightning UI for users.
- Business automation.
Heroku — application platform.
- Custom apps not fitting Salesforce model.
- Heavy compute (image processing, ML).
- Microservices.
- Customer-facing custom UIs.
- Postgres for non-Salesforce data.
AWS — infrastructure / services.
- Storage (S3) for files / archives.
- Compute (Lambda) for specific functions.
- AI/ML services (SageMaker, Bedrock).
- Data warehouse (Redshift).
- Streaming (Kinesis).
- Operations (CloudWatch).
Integration patterns:
Salesforce <-> Heroku:
- Heroku Connect for bidirectional Postgres sync.
- Salesforce Connect for read-only external object access.
- Custom REST APIs in both directions.
- Platform Events + Heroku subscribers for async.
Salesforce <-> AWS:
- AWS PrivateLink for secure VPC connections.
- AWS Lambda triggered by Salesforce events.
- S3 for file storage referenced by Salesforce.
- EventBridge for event routing.
- API Gateway for managed APIs.
Heroku <-> AWS:
- Common backend; use AWS services from Heroku apps.
Use cases:
1. Customer portal.
- Heroku hosts the portal app.
- Salesforce holds business records.
- Heroku Connect syncs in real time.
- AWS S3 stores documents customers download.
2. ML-driven recommendations.
- AWS Bedrock / SageMaker hosts ML model.
- Salesforce Lightning UI displays recommendations.
- Lambda function fronts the model.
- API Gateway exposes to Salesforce.
3. High-volume data processing.
- Salesforce captures events (Platform Events).
- Heroku app subscribes and processes.
- Results written back to Salesforce or S3.
4. PDF / document generation.
- Heroku app with PDF library generates documents.
- S3 stores PDFs.
- Salesforce links via URL or downloads.
5. Data warehouse / analytics.
- Salesforce CDC streams to AWS.
- Snowflake / Redshift consumes.
- BI tool (Tableau, Power BI) queries warehouse.
Architecture decisions:
Where lives what data?
- Customer master in Salesforce (CRM SoT).
- Detail data (transactions, logs) in Postgres / warehouse.
- Files in S3.
- Tokens / keys in Salesforce or AWS Secrets Manager.
Identity:
- SSO via central IdP (Okta).
- Heroku and Salesforce both federate.
- AWS via IAM with SAML.
Network security:
- Salesforce -> Heroku via TLS (public internet but encrypted).
- Heroku -> AWS via private networking where possible.
- Tighten with VPN, PrivateLink, IP allowlisting.
Cost:
- Salesforce per-user.
- Heroku per dyno-hour.
- AWS per-resource.
- Track total cost; budget; optimize.
Operations:
- Multiple platforms means multiple ops surfaces.
- Centralised observability essential.
- On-call rotation across platforms.
- Runbooks for cross-platform issues.
Common pitfalls:
- Tight coupling — every component depends on every other; one break cascades.
- Inconsistent identity — users have different accounts on different platforms.
- Data residency drift — Salesforce in EU, AWS in US — GDPR risk.
- Ops complexity — three platforms, three vendors, three runbooks.
Senior architect insight: hybrid architectures are powerful but complex. Justify the hybrid — what does each platform do that the others can't? If Salesforce alone suffices, don't add Heroku and AWS.
The senior framing: each platform should pull its weight. Heroku for compute that Salesforce can't do; AWS for infrastructure Salesforce doesn't offer. Otherwise you're just adding complexity for prestige.
