Skip to content
GitHubXDiscordRSS

ResourceGroup

Learn how to create, update, and manage AWS Inspector ResourceGroups using Alchemy Cloud Control.

The ResourceGroup resource lets you manage AWS Inspector ResourceGroups for organizing resources to be assessed for security vulnerabilities.

Create a basic ResourceGroup with required tags:

import AWS from "alchemy/aws/control";
const resourceGroup = await AWS.Inspector.ResourceGroup("myResourceGroup", {
ResourceGroupTags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Project", Value: "WebApp" }
],
adopt: false // Optional: Set to true to adopt existing resource
});

Configure a ResourceGroup with additional tags and the adopt property set to true:

const advancedResourceGroup = await AWS.Inspector.ResourceGroup("advancedResourceGroup", {
ResourceGroupTags: [
{ Key: "Environment", Value: "Staging" },
{ Key: "Compliance", Value: "PCI-DSS" }
],
adopt: true // Optional: Adopt existing resource if it already exists
});

Create a ResourceGroup that includes multiple tags for better organization:

const multiTagResourceGroup = await AWS.Inspector.ResourceGroup("multiTagResourceGroup", {
ResourceGroupTags: [
{ Key: "Environment", Value: "Development" },
{ Key: "Team", Value: "DevOps" },
{ Key: "Application", Value: "APIService" }
],
adopt: false
});

Set up a ResourceGroup specifically for an assessment of a web application:

const webAppResourceGroup = await AWS.Inspector.ResourceGroup("webAppResourceGroup", {
ResourceGroupTags: [
{ Key: "Environment", Value: "Production" },
{ Key: "Application", Value: "ECommerce" },
{ Key: "Criticality", Value: "High" }
],
adopt: false
});