Lesson 4 of 6 Managing Posture with Defender for Cloud

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
ScopeManagement account or single account
DeploymentCloudFormation or Terraform
TrustFederated trust
Access optionsDefault or Least privilege
Scan interval4, 6, 12 or 24 hours
GCP
ScopeOrganization or single project
DeploymentGenerated gcloud script
TrustWorkload identity federation and service account impersonation
Access optionsDefault or Least privilege
Scan interval4, 6, 12 or 24 hours
Sort into groups

AWS or GCP onboarding?

Exam skills 4.1.4

Decide which cloud's onboarding each statement describes.

Log in to try this activity Interactive activities are free with an account.

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 AWSPrerequisites
Foundational CSPMThe connector
Defender CSPMThe connector, plus Subscription Owner
Defender for ServersAzure Arc for servers, and the AWS SSM Agent with the AmazonSSMManagedInstanceCore policy
Defender for ContainersAt least one Amazon EKS cluster
Defender for DatabasesThe relevant Amazon RDS resources
True or false

AWS connector facts

Exam skills 4.1.4

Check the requirements of the AWS connector.

Log in to try this activity Interactive activities are free with an account.

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.

Scenario questions

Default or least privilege?

Exam skills 4.1.4

Choose the access option and route for each connection need.

Log in to try this activity Interactive activities are free with an account.
Worked example

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.

Check yourself

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.