1.2.4. š” First Principle: Security Integrated into Development
First Principle: Embedding security practices directly into the development lifecycle ensures inherently secure applications, automated controls, and continuous adherence to secure coding standards.
For developers, security is not an afterthought, but an integral part of the coding and deployment process. This "shift-left" approach ensures vulnerabilities are identified and addressed early, significantly reducing the cost and effort of remediation.
- Secure Coding: Writing code that prevents common vulnerabilities (e.g., input validation, secure credential handling).
- Least Privilege: Ensuring your application's IAM roles and permissions grant only the absolute minimum access required.
- Secure Credential Management: Using AWS Secrets Manager or AWS Systems Manager Parameter Store for application secrets instead of hardcoding.
- Automated Security Scans: Integrating static application security testing (SAST) and dynamic analysis security testing (DAST) into CI/CD pipelines.
- Compliance as Code: Defining security policies and checks programmatically.
Scenario: You are developing a new application that will handle sensitive customer data. The security team emphasizes that security must be part of the design and coding from the very beginning.
ā ļø Exam Trap: "Least privilege" doesn't mean creating a separate IAM user per function ā it means using IAM roles with only the permissions each function needs. The exam penalizes IAM users for applications.
This continuous integration ensures that security is a living aspect of your cloud application development.
š” Tip: Always design your application to use IAM roles for AWS service access, rather than embedding long-lived credentials directly in your code.
