Skip to main content
Welcome to Designing for Security. This article explains how to harden AWS management and governance services that enable other workloads. Because these are highly managed services, you have fewer infrastructure controls but must focus on configuration, access, and what data you send to them. Below we cover provisioning, observability, and management/automation tools, with actionable controls and examples.

Key themes

  • Apply least privilege to the identities that deploy or access management services.
  • Never embed secrets in templates or code that will be stored or transmitted.
  • Protect observability data (logs, traces, metrics) using encryption, sampling, and redaction.
  • Review cross-account / trusted access carefully and grant only required permissions.

Provisioning

When we say “provisioning” we mean services that create other AWS resources. CloudFormation is the canonical example: provide a template (local or in S3) and CloudFormation builds the stack you described.
A presentation slide about AWS CloudFormation showing it as a provisioning tool. It illustrates a three-step workflow: create or use a template, save it to an S3 bucket, and use CloudFormation to build the stack.

CloudFormation security considerations

  • Principle of least privilege for the role CloudFormation uses. The runtime permissions available while a stack runs determine what it can create or change. Avoid deploying stacks with overly permissive user or role credentials.
  • For multi-tenant or cross-account scenarios, prefer dedicated service roles with narrowly scoped policies, or break templates into multiple roles when necessary.
  • Never store credentials or secrets in templates. Use Systems Manager Parameter Store (SecureString) or AWS Secrets Manager (recommended when rotation is required).
  • Monitor CloudFormation activity: use CloudTrail for auditing stack operations and EventBridge/CloudWatch Events for notifications or automated workflows.
A slide diagram showing how AWS CloudFormation creates a cross-account IAM role from a customer-launched template and sends the role ARN via a custom resource to an Amazon SNS topic in your company’s AWS account. The left caption notes that CloudFormation security depends largely on IAM permissions.
Note: CloudFormation templates are configuration artifacts. Runtime responsibilities for data-at-rest, encryption, and network protection belong to the AWS resources the templates provision—not CloudFormation itself.
Never put sensitive credentials in CloudFormation templates. Use Secrets Manager for rotation-capable secrets or SecureString in Systems Manager Parameter Store for static secrets.

CloudFormation events, audit, and encryption

CloudFormation emits stack events to the console and CloudTrail. Ingest these events for audit, troubleshooting, and automation via the CLI, SDKs, EventBridge, or CloudWatch.
A slide showing the AWS CloudFormation console with a stack events log and status updates. The left caption notes that CloudFormation reports events to CloudTrail as well as the CF console.

AWS Cloud Development Kit (CDK)

CDK v2 lets you define infrastructure as code in languages such as TypeScript, Python, Java, and C#. CDK synthesizes CloudFormation templates as its deployment artifact, so the same security controls apply.
A diagram of the AWS Cloud Development Kit (v2) showing an App with Stacks and Constructs that contain AWS resources like Amazon SQS, AWS Lambda, Amazon S3 and DynamoDB. It illustrates code (TypeScript, Python, Java, C#) being converted into CloudFormation templates that provision AWS resources.
Security considerations for CDK
  • CDK synthesizes CloudFormation templates—focus on the IAM identity used to deploy the synthesized templates and on IAM roles/policies created by those templates.
  • Codify least-privilege roles and policies in code so deployments produce narrow permissions by default.
  • Review synthesized CloudFormation (the cdk synth output) for resource policies, IAM roles, and any accidentally included secrets before deployment.
Example synthesized snippet (CDK output showing an SQS queue):
An infographic about the AWS Cloud Development Kit (CDK) with a header question asking what key components and features the team should know. Four numbered colored panels summarize points like defining resources in familiar programming languages, compiling to CloudFormation templates, and other CDK behaviors.

Observability

Observability services collect metrics, logs, traces, and synthetic checks. Treat them as sensitive data sinks: they may contain PII, credentials, or other secrets inadvertently emitted by applications.

CloudWatch overview

CloudWatch provides metrics, logs, alarms, EventBridge, Application Insights, Synthetics (canaries), and X-Ray integration. Use the right feature for each problem:
  • Metrics — performance and capacity trends
  • Alarms — threshold-based alerting
  • Logs — detailed records and retention control
  • X-Ray — distributed tracing
CloudWatch encrypts data in transit and supports encryption at rest. Still, application logs frequently contain PII. Apply log-level protections and data-protection policies to identify and mask or strip sensitive identifiers before sending logs to long-term stores (S3, Kinesis Data Firehose, third-party sinks).
A slide about AWS CloudFormation security advising not to store sensitive credentials in templates. It includes a diagram showing AWS Secrets Manager supplying security credentials to CloudFormation templates and instances.

CloudWatch Synthetics (Canaries)

Canaries simulate user interactions and measure responsiveness. If they capture or generate sensitive data, ensure input/output scrubbing and data protection policies are applied so PII is never persisted in logs or traces.

X-Ray (distributed tracing)

X-Ray provides end-to-end tracing with encryption in transit and at rest. Control who can query or view traces using IAM. To reduce PII exposure in traces:
  • Use sampling rules to exclude high-risk or sensitive traffic.
  • Apply annotations with care and implement manual redaction of sensitive fields.
  • Store traces encrypted with AWS KMS and restrict KMS usage to authorized roles.
A schematic diagram of AWS X‑Ray showing the X‑Ray API/daemon, SDKs, and other clients linking application code and scripts/tools to the X‑Ray console in a web browser. The image also notes that X‑Ray is highly managed and encrypts by default.
A presentation slide about preventing PII exposure in AWS X‑Ray trace data, asking which approaches to use. It lists four numbered recommendations (configure sampling rules, use annotations and manual redaction, enable automatic redaction, and store traces encrypted with AWS KMS).

Personal Health Dashboard (PHD)

PHD delivers real-time alerts about AWS events that affect your specific resources. It maps service issues to your account resources and helps prioritize remediation. Access control guidance:
  • Grant DevOps and operations only the minimum permissions required to view PHD and manage notifications.
  • Do not grant broad administrative privileges only to access PHD details.
A slide asking what minimum permissions a DevOps team should have to use the AWS Personal Health Dashboard, emphasizing least privilege. It shows four numbered options: full administrative access, read-only access, specific dashboard/notification permissions, and permissions to modify service configurations and deployments.

Managed Monitoring: Prometheus (AMP) and Grafana (AMG)

Amazon Managed Service for Prometheus (AMP)
  • Managed Prometheus-compatible ingestion and query service for metrics.
  • Controls: IAM for read/write, VPC interface endpoints, KMS encryption at rest, and CloudTrail for API auditing.
Amazon Managed Grafana (AMG)
  • Grafana is a dashboarding layer that aggregates data sources (CloudWatch, AMP, Elasticsearch, etc.).
  • AMG uses Amazon Identity Center (previously AWS SSO) or a third-party IdP (SAML/OIDC) for interactive user authentication; it does not use IAM for interactive user sign-in.
  • Permission models: service-managed (account or org) and customer-managed. For enterprise environments, prefer customer-managed permissions for fine-grained access.
An Amazon Managed Grafana infographic showing a workflow: create Grafana workspaces, manage user access, connect to multiple data sources, set up dashboards, and centralize 3rd‑party ISV data. A footer notes AMG is highly managed so security mainly revolves around what is sent to Grafana and access.
Remember: For Amazon Managed Grafana, configure authentication through Amazon Identity Center or an external IdP (Okta, Azure AD, etc.). Use customer-managed permissions for fine-grained access control.
A colorful infographic describing security recommendations for restricting access to Amazon Managed Grafana dashboards for a retail company. It lists measures like IP-based ACLs, Amazon Identity Center/third‑party IdP auth, KMS encryption, and IAM role–based access.
A presentation slide titled "Amazon Managed Grafana" showing a Grafana monitoring dashboard with various response-time and metric panels on the right. The left side notes that AMG uses CloudTrail/interface logging and has three levels of permission modes.

Advisors and Automation Tools

These tools give prescriptive guidance or automate deployment tasks. Understand their privileges and what they inspect.

Trusted Advisor

Trusted Advisor runs checks across cost, performance, security, fault tolerance, and service limits. For security, it flags issues like open security groups and overly permissive IAM policies. Use it as an operational checklist, but not as a substitute for a full security assessment.
A slide titled "Trusted Advisor" showing a dashboard summary of checks (e.g., 5 action recommended, 25 investigation recommended, 21 excluded) alongside a "Potential monthly savings" panel listing $1,162.24.

AWS Launch Wizard

Launch Wizard provides guided deployments for complex applications (e.g., Microsoft SQL Server, SAP, Exchange, and some EKS patterns). It helps with sizing, cost estimates, and best-practice choices. Security tips for Launch Wizard:
  • Ensure the IAM user/role running Launch Wizard has only the permissions required; when it creates roles, review the policies and scope them down.
  • The tool can recommend security groups and roles, but you must verify and restrict the IAM permissions granted to the deployment role.
A presentation slide titled "Launch Wizard" showing an illustrated flowchart and logo for the AWS Launch Wizard. The slide notes that Launch Wizards help deploy, estimate cost, and implement best practices for applications like SQL Server, SAP, Exchange, Kubernetes, and more on AWS.
An infographic slide asking how AWS Launch Wizard for EKS can help a deployment team. It shows four numbered points describing features like automated cluster setup, guided security/IAM configuration, and the tool's deployment focus.
An infographic slide about using AWS Launch Wizard to deploy Microsoft SQL Server, summarizing four numbered statements about how IAM roles and permissions are handled. The design has a blue gradient header and four colored numbered boxes explaining different role/permission scenarios.

Compute Optimizer and Amazon Inspector

  • Compute Optimizer recommends instance types and sizing for cost and performance. It requires IAM permissions to analyze resources and can be granted trusted access for cross-account analysis.
  • Amazon Inspector performs vulnerability scanning and runtime assessments of instances and container images. Use Inspector for vulnerability and configuration scanning; it complements, but is distinct from, Compute Optimizer.
An infographic slide about a large enterprise evaluating AWS Compute Optimizer to optimize their cloud compute resources for cost, performance, and security. It shows a question plus four numbered options describing Compute Optimizer recommendations (resizing instances, instance types/sizes, security analysis, and integration with AWS Security Hub).

Cross-account / Trusted Access

Many management services support “trusted access” or cross-account integrations (Compute Optimizer, AWS Config, GuardDuty, etc.). When enabling trusted access:
  • Review the roles and permissions created.
  • Enable trusted access only for accounts that require it.
  • Apply least privilege and use resource-level restrictions where supported.

Quick Reference: Services, Purpose, and Security Controls


Summary / Actionable Checklist

  • Provisioning: Use dedicated deployment roles, minimize privileges, avoid secrets in templates.
  • Observability: Encrypt, sample, and redact; lock down who can view dashboards, logs, and traces.
  • Automation/Advisors: Understand required privileges, limit trusted access, and validate recommended changes before applying.
This concludes Part 1 of Turning-up Security on Management Services.

Watch Video