Skip to Content
IntegrationsCloudAWSServerless

AWS Serverless Integration FAQ

Understand how the Mondoo serverless AWS integration works, including resources created, required permissions, communication, and cost.

What does Mondoo scan?

Mondoo discovers resources across all AWS regions (EC2, S3, RDS, and more) and assesses their configuration against the policies you enable.

How does the serverless integration work?

Mondoo never holds credentials for your AWS account. A CloudFormation template installs a Lambda function in your account, and Mondoo communicates with it over AWS EventBridge. The Lambda authenticates to Mondoo either with workload identity federation (WIF), which stores no long-lived Mondoo credential in your account, or with service credentials stored in the SSM Parameter Store. To learn which method your integration uses, read How do AWS and Mondoo communicate?

Why does Mondoo need to create resources in my AWS account?

To run and schedule scans. The CloudFormation stack creates Lambda functions, SQS queues, IAM roles and instance profiles, EventBridge rules, an EventBridge Scheduler schedule group, and CloudWatch log groups. The Lambda stores its configuration in SSM parameters and creates an S3 cache bucket in the install region and in each region it scans.

To run scans, the Lambda launches short-lived EC2 scanner instances for account scans, EBS volume scans, ECR image scans, and EC2 Instance Connect scans, and terminates each one when its scan finishes. EBS volume scans also create temporary snapshots and volumes. To learn which instance types the scanner uses, read Which EC2 instance types does the scanner launch?

Every resource Mondoo creates is tagged Created By: Mondoo. The Lambda's IAM role can only delete EC2 resources that carry this tag.

For background, see Tagging your AWS resources in the AWS documentation.

How do AWS and Mondoo communicate?

The Lambda, the scanner instances it launches, and the EC2 instances it scans through SSM call Mondoo Platform over HTTPS. They authenticate with settings stored in the SSM Parameter Store of the install region. The Authentication row in the INTEGRATION CONFIGURATION section of the integration page shows which method an integration uses:

  • Workload Identity Federation: Every single-account install you create in the Mondoo App uses WIF, including an AWS serverless integration added at the organization level. The stack stores a WIF configuration in the MondooWifConfig parameter, and the Lambda exchanges its AWS identity for short-lived Mondoo credentials. No long-lived Mondoo credential is stored in your account.
  • Service account: An AWS Organization (StackSet) install uses service credentials. When each stack is created, the Lambda exchanges the short-lived MondooToken you generate in Mondoo for Mondoo service credentials and stores them in the MondooAgentConfig parameter.

The Mondoo side uses AWS EventBridge cross-account routing. The event bus policy and rule are created by the CloudFormation stack.

What information leaves my AWS account?

Scan report results only. Mondoo Platform stores the latest report for every scanned asset, plus counts of various resources in the account.

What permissions does the integration request?

The full permission set is in the Mondoo serverless integration JSON.

Should I integrate an organization or a single account?

If your AWS Organization follows AWS standard practices, choose an organization integration. Before deploying, check the organization StackSet requirements.

How does the Lambda update itself?

Every 3 hours, an EventBridge rule triggers the Mondoo Updater Lambda. It compares the ETag of the current build in Mondoo's S3 bucket to the ETag it last applied; if they differ, it updates the Mondoo Lambda's function code directly from S3.

If you pin the scanner to a specific release with the Scanner version option when you create the integration, automatic updates are off. The scanner stays on that release until you change the stack's FixedVersion parameter.

What happens if I delete the CloudFormation stack?

The Lambda is notified and immediately deletes every Mondoo-created resource in the account. The integration status becomes deleted in Mondoo. No data is lost on the Mondoo side, and the stack can be recreated at any time.

How much does it cost to run?

Most usage falls inside the AWS Free Tier. A representative monthly bill for one account looked like this (Free Tier limits shown for context):

  • CloudWatch PutLogs: 1 GB (Free: first 5 GB ingested)
  • CloudWatch TimedStorage: 0.16 GB (Free: first 5 GB-mo)
  • CloudWatch Events: 8,000 events ($1.00 per million custom events)
  • Lambda compute: 76,000 GB-seconds (Free: 400,000 GB-seconds)
  • Lambda requests: 11,000 (Free: 1,000,000)
  • SQS requests: 626,000 (Free: 1,000,000)
  • S3 requests: ~300 total, all in Free Tier

This bill doesn't include the EC2 scanner instances or the temporary EBS snapshots and volumes that scans create. AWS bills those at its standard EC2 and EBS rates for as long as they exist. The scanner uses small burstable instance types and terminates each instance when its scan finishes.

Which EC2 instance types does the scanner launch?

The scanner tries these instance types in order. When AWS has no capacity for one type, it moves on to the next:

  • Account scans, ECR image scans, and scans of Linux instances: t4g.medium (arm64), then t3.medium, t3a.medium, t2.medium, and t4g.large (arm64).
  • Scans of Windows instances: t2.medium, then t3.medium and t3a.medium.

The scanner tries each type in every candidate subnet before it moves on to the next type. In a custom VPC, every subnet that carries the VPC's tag is a candidate, so tag subnets in more than one Availability Zone to let the scanner fall back to another zone. In the AWS default VPC, EC2 picks the subnet.

The stack's IAM policy lets the Lambda launch only these instance types: t2.micro, t2.medium, t2.large, t3.medium, t3.large, t3a.medium, t3a.large, t4g.micro, t4g.medium, and t4g.large. A stack created from an earlier template can allow fewer types. The scanner skips any type it isn't allowed to launch, whether the stack's policy or a service control policy or permissions boundary in the account denies it, so each denied type leaves it one fewer type to fall back to. To allow every fallback type, update the stack to the current template, and make sure that any service control policy or permissions boundary that limits ec2:InstanceType allows the scanner's types.

How does Mondoo handle AWS API rate limits?

Scan jobs are spread out to avoid hammering the EC2 and SSM APIs. If the Lambda hits a rate-limit error, it pauses all scan jobs for 15 minutes.

Can I inspect what gets deployed?

Yes. The CloudFormation template and Lambda code are in Mondoo's public S3 bucket:

Mondoo publishes the same files to a bucket in each supported region, because AWS requires a Lambda function to load its code from a bucket in its own region. You can install the integration only in a supported region. For the list, read Set up a new AWS integration.

Next steps

Last updated on

On this page