I am facing issue while launching cloudformation template passing userdata. Seems like no commands are running inside. Instance is coming up healthy without running these commands. Please help to resolve.
AWSTemplateFormatVersion : 2010-09-09
Description: sonar
Resources:
Ec2Instance:
Type: AWS::EC2::Instance
Properties:
KeyName: sivakey_feb
ImageId: ami-04bfee437f38a691e
UserData:
Fn::Base64:
!Sub |
#!/bin/bash -xe
sudo chown -R ec2-user:ec2-user /opt/sonar/temp/conf
/opt/sonar/bin/linux-x86-64/sonar.sh start
InstanceType: t2.large
Tags:
-
Key: Name
Value: sonar