Limits & superpowers
The cloud has its limits. And
arc itself is an abstraction with deliberate constraints. Whether we label them constraints or limits, they are trade-offs you need to be aware of when designing your software architecture for cloud functions.
Architect primitives are based on the following AWS serverless ecosystem services:
- CloudFormation and SAM for AWS standard deployments
- Lambda cloud native functions for compute
- API Gateway for HTTP and Websocket functions
- Route53 for DNS
- CloudFront for CDN
- S3 for static assets
- Simple Notification Service for event pub/sub functions
- Simple Queue Service for queue functions
- CloudWatch Events for scheduled functions
- DynamoDB for persistence of structured data and trigger functions
- Parameter Store for service discovery and environment variables
- IAM automatically generated least privilege role
Note: with Architect Macros all AWS services supported by CloudFormation can be utilized!
Cloud limits and gotchas
- Lambda cold starts are vicious on large Lambdas; the best antidote is to author small as possible Lambda functions (rule of thumb: sub 5MB compressed, including modules, usually results in sub-second execution)
- Lambda functions are time-limited to 5 seconds by default. This can be adjusted, however they cannot execute for longer than 15 minutes maximum. You can also use background tasks to break work down into smaller chunks.
- CloudFormation templates can only have 200 resources; Architect can nest templates but API Gateway can only support 300 routes and many other limits can apply
- Less code is faster to write and deploy
- Determinism that comes as a result of infra as code deployments
- Extend with the entire AWS ecosystem of services and tools
- Predictable costs and 100% utilization (scale to zero)
- Do less of everything: patching, no upgrading, no more orchestration
- Faster debugging because errors became very shallow in isolation
- Better isolation also equals better security posture and least privilege by default
Focus on unique business value, only maintain differentiated code and iterate faster with tighter feedback loops.