AWS::CloudFormation::Init not executing commands
You have to execute cfn-init
in order for AWS::CloudFormation::Init
to do anything. This is most commonly done via cloud-init user data. Here is the example from the cfn-init documentation:
UserData: !Base64
'Fn::Join':
- ''
- - |
#!/bin/bash -xe
- |
# Install the files and packages from the metadata
- '/opt/aws/bin/cfn-init -v '
- ' --stack '
- !Ref 'AWS::StackName'
- ' --resource WebServerInstance '
- ' --configsets InstallAndRun '
- ' --region '
- !Ref 'AWS::Region'
- |+