설정 전

- EC2 인스턴스 생성 후 별도 설정 없이 AMI를 생성 하면 시스템 변경 값이 저장되지 않고 /etc/cloud/cloud.cfg 설정값대로 생성 되거나 다른 오류가 발생할 수 있음

 

설정 후

- EC2 인스턴스 생성 후 /etc/cloud/cloud.cfg 파일에 변경할 시스템 값을 설정 후 AMI를 생성 하면 시스템 변경 값을 유지한 채 생성 됨

- 또는 EC2 생성 과정에 user-data 입력란에서 cloud-init 명령을 전달해 설정 가능

 

예제

- ssh password 접속 설정

# ssh_pwaut 부분을 True 또는 1로 설정

 

참고

 

- https://docs.aws.amazon.com/ko_kr/AWSEC2/latest/UserGuide/user-data.html

 

시작 시 Linux 인스턴스에서 명령 실행 - Amazon Elastic Compute Cloud

시작 시 Linux 인스턴스에서 명령 실행 Amazon EC2에서 인스턴스를 시작할 때 사용자 데이터를 인스턴스에 전달하여 일반적인 구성 작업을 자동으로 수행하는 데 사용하도록 할 수 있고, 인스턴스가

docs.aws.amazon.com

- https://access.redhat.com/documentation/ko-kr/red_hat_virtualization/4.1/html/virtual_machine_management_guide/sect-using_cloud-init_to_automate_the_configuration_of_virtual_machines

 

7.8. Cloud-Init을 사용하여 가상 머신 설정 자동화 Red Hat Virtualization 4.1 | Red Hat Customer Portal

The Red Hat Customer Portal delivers the knowledge, expertise, and guidance available through your Red Hat subscription.

access.redhat.com

 

'클라우드 > AWS' 카테고리의 다른 글

AWS Transit Gateway  (0) 2021.06.01
Amazon VPC Peering  (0) 2021.06.01
AWS Network Load Balancer  (0) 2021.05.21
AWS Internet Gateway  (0) 2021.05.17
AWS Gateway LoadBalancer  (0) 2021.04.26

+ Recent posts