Created the EC2 instance through CloudFormation template using "AWS::CloudFormation::Init:"
Resources: : Type: 'AWS::EC2::Instance' Metadata: AWS::CloudFormation::Init: config: users: admin: uid: "50" homeDir: '/temp' Properties: ImageId: ami-04b2519c83e2a7ea5 KeyName: !Ref KeyName InstanceType: t2.micro UserData:"Fn::Base64": !Sub | #!/bin/bash -xe # Get the latest CloudFormation package yum update -y aws-cfn-bootstrap # Start cfn-init /opt/aws/bin/cfn-init -s ${AWS::StackId} -r --region ${AWS::Region}
Stack creation is successful but not able to connect to my Linux machine through ssh.It is throwing timeout when doing ssh -i "" ec2-user@I have changed the permission of the .pem file but no success.