Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion aws_quickstart/datadog_agentless_scanning.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Parameters:
Type: String
Description: Your current AWS account ID for stack deployment
AllowedPattern: "^[0-9]{12}$"

AgentlessHostScanning:
Type: String
AllowedValues:
Expand Down Expand Up @@ -333,6 +333,9 @@ Resources:
# Perform unattended upgrades
unattended-upgrade -v

# Remove previously installed kernels after security upgrades
apt autoremove -y --purge

# Get IMDS metadata to fetch the API Key from SecretsManager (without having to install awscli)
IMDS_TOKEN=$( curl -sSL -XPUT "http://169.254.169.254/latest/api/token" -H "X-AWS-EC2-Metadata-Token-TTL-Seconds: 30")
IMDS_INSTANCE_ID=$(curl -sSL -XGET "http://169.254.169.254/latest/meta-data/instance-id" -H "X-AWS-EC2-Metadata-Token: $IMDS_TOKEN")
Expand Down Expand Up @@ -374,6 +377,8 @@ Resources:
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
Unattended-Upgrade::Automatic-Reboot-Time "now";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
EOF

# Perform unattended upgrades 10 min after boot, then every 3 hours
Expand Down
Loading