Invalid Document Content Error in running an AWS SSM document
- Certbot with Apache
- Letsencrypt Certbot Common Tasks
- Installing certbot on an EC2 using AWS Systems Manager
- Troubleshooting letsencrypt and certbot
- Invalid Document Content Error in running an AWS SSM document
If you are using terraform to create a systems manager document and an SSM association, there are a few hiccups you might encounter
Also see this post on Systems Manager vs. User Data to configure an EC2 instance on AWS
Issue 1 – Unique SSM Doc Name
# null resource - to ensure unique SSM doc name for each run resource "null_resource" "nullres" { # not spinning up anything. } # SSM doc resource "aws_ssm_document" "my_ssm_doc" { name = "certbot_${null_resource.nullres.id}" document_type = "Command" document_format = "YAML" content = file("./ec2_init.yaml") }
Issue 2 – Invalid Document Content
# SSM doc
resource "aws_ssm_document" "my_ssm_doc" {
name = "certbot_${null_resource.nullres.id}"
document_type = "Command"
document_format = "YAML"
content = file("./ec2_init.yaml")
}
Leave a Reply