Best Practices for Building Solutions on AWS
Evaluate tradeoffs so that you can select optimal approach.
-
You might trade consistency, durability, and space for time and latency to deliver higher performance.
-
You might prioritize speed to market over cost.
Best Practices
-
Enable Scalability
- Use services like Amazon EC2 Auto Scaling to scale out the servers.
-
Automate the Environment
- Amazon EC2 Auto Scalaing can scale the servers based on certain metrics.
-
Treat Resources as disposable
- Automate deployment of new resources with identical configurations.
- Terminate resources when they are not in use
- Switch to new IP address automatically.
-
Use loosely coupled components
- Decouple the architecture with services like Elastic Load Balancing, message queues.
-
Design services not servers.
- When appropriate, consider using containers and serverless solutions.
- Use message queues to handle communication between web servers.
-
Choose the right database solution
- Consider read-write needs, latency, storage requirements, nature of queries, concurrent connections and many more before choosing any database.
-
Avoid single point of failure
- Assue everything fails and then design backward
- Use redundancy to prevent SPOF. Example: database replication
-
Optimize for cost
- Take advantages of flexibility of aws to increase cost efficiency.
-
Use caching
- Use services like Amazon CloudFront
-
Secure the entire infrastructure
- Build security at every layers of the infrastructure.