Amazon Linux 2027 (AL2027) is now in public preview, introducing SELinux in enforcing mode by default, a significant change from AL2023's permissive mode. This shift impacts deployment strategies for containerized microservices and web applications, requiring careful validation of application behavior against stricter security policies. The article highlights migration challenges and the cloud-native preference for host replacement over in-place upgrades.
Read original on InfoQ ArchitectureAmazon Linux 2027 (AL2027) has entered public preview, building upon the AL2023 baseline. The most impactful change for system architects and developers is the default enablement of SELinux in enforcing mode. This contrasts with AL2023, where SELinux operates in permissive mode, merely logging policy violations without blocking them. This change significantly alters the security posture and deployment considerations for applications running on AL2027.
What is SELinux?
SELinux (Security-Enhanced Linux) is a security mechanism that provides Mandatory Access Control (MAC) to the Linux kernel. Unlike Discretionary Access Control (DAC), where access is determined by user/group ownership, MAC dictates that all access attempts must be explicitly permitted by a security policy, significantly enhancing system security by limiting potential damage from compromised applications.
With SELinux in enforcing mode, applications that previously ran successfully on AL2023 by virtue of only logging policy violations will now fail unless their file contexts, port access, and general access patterns strictly conform to the defined SELinux policies. This mandates thorough testing and potential policy adjustments during the migration process, especially for complex or legacy applications not designed with MAC in mind. This directly impacts the operational overhead for DevOps and SRE teams.
The community response highlights a preference for replacing hosts rather than in-place upgrades in cloud-native environments. While in-place upgrades might be desirable for 'pet' servers, the 'cattle' approach of immutability and host replacement is generally favored for its consistency and reduced operational complexity. This means infrastructure-as-code deployments will need to provision new AL2027 instances and redeploy applications, rather than attempting to upgrade existing AL2023 instances.
For system designers, the shift to SELinux enforcing in AL2027 means that security considerations need to be integrated earlier into the application development and deployment lifecycle. Applications running on AL2027 must be designed with an understanding of their required resource access and interactions to define appropriate SELinux policies. This encourages a more secure-by-default posture for applications deployed on AWS, but demands greater upfront effort in policy definition and testing.