Connecting AWS and GCP to Defender for Cloud
This lesson explains how connectors onboard other clouds, and what each plan needs.
Learning outcomes
After completing this lesson, you will be able to:
- Compare AWS and GCP onboarding.
- Identify the prerequisites of each plan.
- Explain how on-premises servers differ.
- Choose an access option.
Why connect other clouds
Attackers do not respect cloud boundaries, and a security team cannot watch three consoles equally well. Connecting AWS and GCP to Defender for Cloud gives one view of posture, one secure score, one compliance dashboard and common alerting. Attack paths can even cross clouds. The onboarding unit is a connector, an Azure resource that represents an account or project, and it uses federated trust and short-lived credentials, so no long-lived secret is stored in Azure.
The following comparison shows how the two onboarding processes differ.
AWS or GCP onboarding?
Connecting AWS
To add an AWS connector, open Environment settings > Add environment > Amazon Web Services. Choose a management account, for an entire organization, or a single account. Select the plans to enable. The portal produces a CloudFormation template, which can be deployed from an S3 URL or uploaded, or a Terraform equivalent. It creates the roles that Defender for Cloud needs in AWS.
The prerequisites are Contributor on the Azure subscription, and Subscription Owner if Defender CSPM is included. Permissions analysis through cloud infrastructure entitlement management needs Application Administrator or Cloud Application Administrator in Microsoft Entra ID. After enabling a new plan on a connector, update the CloudFormation stack, since new permissions may be needed. An AWS account that is already connected to Microsoft Sentinel cannot be connected in this way.
| Plan on AWS | Prerequisites |
|---|---|
| Foundational CSPM | The connector |
| Defender CSPM | The connector, plus Subscription Owner |
| Defender for Servers | Azure Arc for servers, and the AWS SSM Agent with the AmazonSSMManagedInstanceCore policy |
| Defender for Containers | At least one Amazon EKS cluster |
| Defender for Databases | The relevant Amazon RDS resources |
AWS connector facts
Connecting GCP
For GCP, open Environment settings > Add environment > Google Cloud Platform. Choose an organization, with optional project and folder exclusions, or a single project, with its number and ID. The portal generates a gcloud script, to run in Google Cloud. It creates a workload identity pool, a workload identity provider for each plan, service accounts and policy bindings.
The onboarding project needs certain APIs to be enabled, including iam.googleapis.com, sts.googleapis.com, cloudresourcemanager.googleapis.com, iamcredentials.googleapis.com and compute.googleapis.com. Defender for Servers on GCP uses Azure Arc, as on AWS.
On-premises and other sources
A connector is for a cloud provider. On-premises servers are not connected this way: they are onboarded with Azure Arc, and then they are covered by the subscription's Defender for Servers plan. Defender CSPM can also connect to DevOps environments, namely GitHub, Azure DevOps and GitLab, and to external container registries such as Docker Hub and JFrog Artifactory.
Log ingestion features are in preview: AWS CloudTrail management event ingestion and GCP Cloud Logging ingestion. National government clouds are not supported for AWS connectors.
Least privilege access
The Default access option gives Defender for Cloud the permissions for current and future features, so new features work without further changes. The Least privilege access option gives only what the selected plans need, but enabling features later requires updating permissions. A security-conscious organization may prefer least privilege, and it should accept the extra work.
No stored keys
A question may offer an access key for an IAM user as a way of connecting AWS. Modern connectors use federation and roles, and they store no long-lived secret.
Default or least privilege?
EC2 coverage
After connecting an AWS account with Defender for Servers enabled, the company sees the account's posture findings, but its EC2 instances do not appear as protected machines. What should you check?
Defender for Servers on AWS needs Azure Arc and the AWS SSM Agent with the AmazonSSMManagedInstanceCore policy. Without these, automatic onboarding cannot install the Connected Machine agent. Check the agent and the policy on the instances, and the plan's Arc setting on the connector. If the plan was enabled after the connector was created, confirm that the CloudFormation stack has been updated.
Installing the Log Analytics agent is not relevant, since it has been retired. Changing the scan interval affects posture freshness, not onboarding. Creating an AWS IAM user with an access key is not how connectors work.
A new plan is enabled on an AWS connector. What else may be needed?
Show answer
Update the CloudFormation stack, since the plan may need new permissions.
Exam Tips
Remember for the exam
- AWS uses CloudFormation or Terraform; GCP uses a generated gcloud script.
- Servers plans on AWS and GCP need Azure Arc.
- Update the CloudFormation stack after enabling a new plan.
- On-premises servers use Arc, not a connector.