Skip to content
GitHubXDiscordRSS

UserGroup

Learn how to create, update, and manage AWS ElastiCache UserGroups using Alchemy Cloud Control.

The UserGroup resource allows you to manage AWS ElastiCache UserGroups that provide access control for ElastiCache resources.

Create a basic UserGroup with required properties and a tag.

import AWS from "alchemy/aws/control";
const userGroup = await AWS.ElastiCache.UserGroup("myUserGroup", {
UserGroupId: "my-user-group-id",
Engine: "redis",
UserIds: ["user1", "user2"],
Tags: [
{ Key: "Environment", Value: "Production" }
]
});

Create a UserGroup with additional properties, including the adoption option.

const advancedUserGroup = await AWS.ElastiCache.UserGroup("advancedUserGroup", {
UserGroupId: "my-advanced-user-group-id",
Engine: "memcached",
UserIds: ["user3", "user4"],
Tags: [
{ Key: "Environment", Value: "Staging" },
{ Key: "Project", Value: "MyProject" }
],
adopt: true // Adopt existing resource if it already exists
});

Illustrate creating a UserGroup with several user IDs.

const multiUserGroup = await AWS.ElastiCache.UserGroup("multiUserGroup", {
UserGroupId: "my-multi-user-group-id",
Engine: "redis",
UserIds: [
"user5",
"user6",
"user7",
"user8"
],
Tags: [
{ Key: "Department", Value: "Engineering" }
]
});

Create a UserGroup specifically for resource management tasks.

const resourceManagementGroup = await AWS.ElastiCache.UserGroup("resourceManagementGroup", {
UserGroupId: "resource-management-group-id",
Engine: "redis",
UserIds: ["adminUser"],
Tags: [
{ Key: "AccessLevel", Value: "Admin" }
]
});