title: Cloudformation Init config files not writing the files
body: <p>I am using AWS Cloudformation scripts to bring up a Auto-scaling Ec2 Instance - sample code provided below</p>
  
  <pre><code>    "GatewayLabAutoScalingGroup": {
    "Metadata": {
      "AWS::CloudFormation::Init": {
        "config": {
          "commands": {
            "a_install_pip": {
              "command": "pip install requests boto3"
            },
            "c_restart_cron": {
              "command": "service crond restart"
            },
            "d_restart_cfn_hup": {
              "command": "service cfn-hup restart"
            }
          },
          "files": {
            "/etc/cfn/cfn-hup.conf": {
              "content": {
                "Fn::Join": [
                  "",
                  [
                    "[main]\nstack=",
                    {
                      "Ref": "AWS::StackName"
                    },
                    "\nregion=",
                    {
                      "Ref": "AWS::Region"
                    },
                    "\nverbose=true\ninterval=1\n"
                  ]
                ]
              },
              "group": "root",
              "mode": "000644",
              "owner": "root"
            },
            "/usr/local/sbin/join_ad_script.sh": {
              "content": {
                "Fn::Join": [
                  "",
                  [
                    "sudo yum -y update\nsudo yum -y install sssd realmd krb5-workstation\nsudo realm leave\n\nDOMAIN=\"",
                    {
                      "Ref": "SimpleADDomain"
                    },
                    "\"\n\ncat &lt;&lt;EOF &gt; /etc/resolv.conf\nnameserver ",
                    {
                      "Fn::Select": [
                        0,
                        {
                          "Fn::GetAtt": [
                            "WorkspacesSimplead",
                            "DnsIpAddresses"
                          ]
                        }
                      ]
                    },
                    "\nnameserver ",
                    {
                      "Fn::Select": [
                        1,
                        {
                          "Fn::GetAtt": [
                            "WorkspacesSimplead",
                            "DnsIpAddresses"
                          ]
                        }
                      ]
                    },
                    "\nEOF\n\n# empty all current sssd cache\nsss_cache -E\n\necho ",
                    {
                      "Ref": "SimpleADPassword"
                    },
                    " | sudo realm join -U Administrator@${DOMAIN^^} ${DOMAIN^^} --verbose\nsudo sed -re 's/^(PasswordAuthentication)([[:space:]]+)no/\\1\\2yes/' -i.`date -I` /etc/ssh/sshd_config\necho \"enumerate=true\" &gt;&gt; /etc/sssd/sssd.conf\nsudo service sssd restart\nsudo service sshd restart\n\n# empty all current sssd cache\nsss_cache -E\n"
                  ]
                ]
              },
              "group": "root",
              "mode": "000755",
              "owner": "root"
            }
          }
        }
      }
    },
    "Properties": {
      "AvailabilityZones": [
        {
          "Fn::Select": [
            0,
            {
              "Fn::GetAZs": ""
            }
          ]
        }
      ],
      "HealthCheckGracePeriod": 300,
      "HealthCheckType": "EC2",
      "LaunchConfigurationName": {
        "Ref": "GatewayLabLaunchConfiguration"
      },
      "LoadBalancerNames": [
  
      ],
      "MaxSize": 2,
      "MinSize": 1,
      "Tags": [
        {
          "Key": "Name",
          "PropagateAtLaunch": true,
          "Value": "hub-autoscaling"
          }
        }
      ],
      "VPCZoneIdentifier": [
        {
          "Ref": "EC2SubnetSubnet1"
        }
      ]
    },
    "Type": "AWS::AutoScaling::AutoScalingGroup",
    "UpdatePolicy": {
      "AutoScalingRollingUpdate": {
        "MaxBatchSize": 1,
        "MinInstancesInService": 1,
        "PauseTime": "PT60S"
      }
    }
  }
  </code></pre>
  
  <p>The files are not written to in the instance
  The instance is coming up in a Private VPC 
  We have a proxy configured on port 8080</p>
  
  <p>The works fine when the instance is connected to a NAT Gateway without a proxy</p>
  
  <p>I do have ports 80, 22 &amp; 443 opened up</p>