Partitioning the EBS Root Volume of an AWS EC2 Instance

0

One of the few things I do not like about the AWS EC2 service is that all available images (AMIs) used to to launch new instances have a single partition where the root filesystem is mounted on. In my opinion, this approach is not appropriate, there are also a few security standards requiring specific partitioning.

Is there some doc about creating an instance/AMI (by Terraform or CloudFormation or Packer) with a good partitioning scheme?

질문됨 일 년 전1349회 조회
1개 답변
1

You can replace a root volume, but I suspect that is not what you are trying to do.

I would suggest you think about it differently. The root volume should only contain the minimal OS for meeting your requirements for the security and operational considerations you are referring to. You can specify volumes in a Launch Template using block device mappings, then use the user data to mount those volumes.

profile pictureAWS
답변함 일 년 전
  • But filling the / filesystem only because some "crazy" log filled /var is not so good. Especially if you have some "legacy" application, it's not easy to redirect all logs/data on another volume and you are always at risk to forget some of them.

  • Monitoring logging to prevent this from happening is both a security and a reliability best practice.

    That being said, you can also use symbolic links to ensure the logs are in a filesystem other than root.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠