diff --git a/openvidu-deployment/community/singlenode/aws/cf-openvidu-singlenode.yaml b/openvidu-deployment/community/singlenode/aws/cf-openvidu-singlenode.yaml index 98c0017b..47d27f7c 100644 --- a/openvidu-deployment/community/singlenode/aws/cf-openvidu-singlenode.yaml +++ b/openvidu-deployment/community/singlenode/aws/cf-openvidu-singlenode.yaml @@ -838,11 +838,15 @@ Resources: apt-get update && apt-get install -y \ python3-pip \ - ec2-instance-connect \ - pipx + ec2-instance-connect - pipx install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz - export PATH=$PATH:/root/.local/bin + # Detect Ubuntu version and install cfn-bootstrap accordingly + UBUNTU_VERSION=$(lsb_release -rs | cut -d. -f1) + if [ "$UBUNTU_VERSION" -ge 24 ]; then + python3 -m pip install --break-system-packages https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + else + python3 -m pip install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + fi cfn-init --region ${AWS::Region} --stack ${AWS::StackId} --resource OpenviduServer diff --git a/openvidu-deployment/pro/ha/aws/cf-openvidu-ha.yaml b/openvidu-deployment/pro/ha/aws/cf-openvidu-ha.yaml index 49d6023e..60cd0b9c 100644 --- a/openvidu-deployment/pro/ha/aws/cf-openvidu-ha.yaml +++ b/openvidu-deployment/pro/ha/aws/cf-openvidu-ha.yaml @@ -1306,7 +1306,14 @@ Resources: apt-get update && apt-get install -y \ python3-pip \ ec2-instance-connect - pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + + # Detect Ubuntu version and install cfn-bootstrap accordingly + UBUNTU_VERSION=$(lsb_release -rs | cut -d. -f1) + if [ "$UBUNTU_VERSION" -ge 24 ]; then + python3 -m pip install --break-system-packages https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + else + python3 -m pip install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + fi cfn-init -v --region ${AWS::Region} --stack ${AWS::StackName} --resource OpenViduMasterLaunchTemplate @@ -1352,7 +1359,14 @@ Resources: apt-get update && apt-get install -y \ python3-pip \ ec2-instance-connect - pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + + # Detect Ubuntu version and install cfn-bootstrap accordingly + UBUNTU_VERSION=$(lsb_release -rs | cut -d. -f1) + if [ "$UBUNTU_VERSION" -ge 24 ]; then + python3 -m pip install --break-system-packages https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + else + python3 -m pip install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + fi cfn-init -v --region ${AWS::Region} --stack ${AWS::StackName} --resource OpenViduMasterLaunchTemplate diff --git a/openvidu-deployment/pro/singlenode/aws/cf-openvidu-singlenode.yaml b/openvidu-deployment/pro/singlenode/aws/cf-openvidu-singlenode.yaml index 78b806b7..6dde6fd0 100644 --- a/openvidu-deployment/pro/singlenode/aws/cf-openvidu-singlenode.yaml +++ b/openvidu-deployment/pro/singlenode/aws/cf-openvidu-singlenode.yaml @@ -868,11 +868,15 @@ Resources: apt-get update && apt-get install -y \ python3-pip \ - ec2-instance-connect \ - pipx + ec2-instance-connect - pipx install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz - export PATH=$PATH:/root/.local/bin + # Detect Ubuntu version and install cfn-bootstrap accordingly + UBUNTU_VERSION=$(lsb_release -rs | cut -d. -f1) + if [ "$UBUNTU_VERSION" -ge 24 ]; then + python3 -m pip install --break-system-packages https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + else + python3 -m pip install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + fi cfn-init --region ${AWS::Region} --stack ${AWS::StackId} --resource OpenviduServer