im trying to do autoscalling with memory utilization. i have created a subnet where auto assign public ip is disabled but route to IGW is attached.
I ran below script but cloudwatch agent is not downloaded on the server.
Fn::Sub': >
#!/bin/bash
rpm -Uvh
https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm
/opt/aws/bin/cfn-init -v --stack ${AWS::StackId} --resource
ASGLaunchConfiguration --region ${AWS::Region} --configsets default
/opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackId} --resource
I also exported the proxy details still no sucess.Due to this cloudwatch alarm stays in insufficient data
Later on I added proxy server , still cloudwatch agent was not downloaded
!Base64
'Fn::Sub': >
#!/bin/bash
export https_proxy=10.20.10.5:8080
rpm -Uvh
https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm
/opt/aws/bin/cfn-init -v --stack ${AWS::StackId} --resource
ASGLaunchConfiguration --region ${AWS::Region} --configsets default
/opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackId} --resource
ASGLaunchConfiguration --region ${AWS::Region}
any suggestion ?