File tree Expand file tree Collapse file tree 3 files changed +14
-18
lines changed
Expand file tree Collapse file tree 3 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -103,11 +103,11 @@ def __init__(
103103 cloudwatch_config_param = aws_ssm .StringParameter (
104104 self ,
105105 "CloudWatchAgentConfigParam" ,
106- description = "Configruation of Cloudwatch Agent for Amazon Linux 2" ,
106+ description = "Configuration of Cloudwatch Agent for Amazon Linux 2" ,
107107 parameter_name = cloudwatch_ssm_param ,
108108 string_value = cloudwatch_config_string ,
109109 )
110- # Grant ssm:GetParameters to ECS Instnace role.
110+ # Grant ssm:GetParameters to ECS Instance role.
111111 cloudwatch_config_param .grant_read (self .ecs_instance_role )
112112
113113 userdata_file = open (os .path .join (dirname , "userdata.txt" ), "rb" ).read ()
Original file line number Diff line number Diff line change @@ -33,19 +33,17 @@ runcmd:
3333
3434--==MYBOUNDARY==
3535Content-Type: text/cloud-boothook; charset="us-ascii"
36+ #!/bin/bash -xe
3637
38+ # ===== Mount /efs
39+ # See: https://docs.aws.amazon.com/linux/al2023/ug/efs.html
3740# Install amazon-efs-utils
38- cloud-init-per once install_amazon-efs-utils yum install -y amazon-efs-utils
41+ cloud-init-per once install_amazon-efs-utils dnf install -y amazon-efs-utils
3942
4043# Create /efs folder
4144cloud-init-per once mkdir_efs mkdir /mnt/efs
42-
43- # Create a 16GB swapfile (128M * 128)
44- cloud-init-per once create_swap
45-
46- # Mount /efs
47- cloud-init-per once mount_efs echo -e '{}:/ /mnt/efs efs defaults,_netdev 0 0' >> /etc/fstab
48- mount -a
45+ # Mount
46+ cloud-init-per once mount_efs mount -t efs {} /mnt/efs
4947
5048--==MYBOUNDARY==
5149Content-Type: text/x-shellscript; charset="us-ascii"
Original file line number Diff line number Diff line change @@ -33,19 +33,17 @@ runcmd:
3333
3434--==MYBOUNDARY==
3535Content-Type: text/cloud-boothook; charset="us-ascii"
36+ #!/bin/bash -xe
3637
38+ # ===== Mount /efs
39+ # See: https://docs.aws.amazon.com/linux/al2023/ug/efs.html
3740# Install amazon-efs-utils
38- cloud-init-per once install_amazon-efs-utils yum install -y amazon-efs-utils
41+ cloud-init-per once install_amazon-efs-utils dnf install -y amazon-efs-utils
3942
4043# Create /efs folder
4144cloud-init-per once mkdir_efs mkdir /mnt/efs
42-
43- # Create a 16GB swapfile (128M * 128)
44- cloud-init-per once create_swap
45-
46- # Mount /efs
47- cloud-init-per once mount_efs echo -e '{}:/ /mnt/efs efs defaults,_netdev 0 0' >> /etc/fstab
48- mount -a
45+ # Mount
46+ cloud-init-per once mount_efs mount -t efs {} /mnt/efs
4947
5048--==MYBOUNDARY==
5149Content-Type: text/x-shellscript; charset="us-ascii"
You can’t perform that action at this time.
0 commit comments