User
The User resource lets you manage AWS MemoryDB Users, which are essential for controlling access to your MemoryDB clusters.
Minimal Example
Section titled “Minimal Example”Create a basic MemoryDB user with required properties and an optional access string.
import AWS from "alchemy/aws/control";
const memoryDbUser = await AWS.MemoryDB.User("memoryDbUser", { UserName: "memoryUser1", AccessString: "on ~* +@all"});
Advanced Configuration
Section titled “Advanced Configuration”Configure a MemoryDB user with authentication mode and tags for better management.
const advancedMemoryDbUser = await AWS.MemoryDB.User("advancedMemoryDbUser", { UserName: "memoryUser2", AccessString: "on ~* +@all", AuthenticationMode: { Type: "password", Passwords: ["SecurePassword123!"] }, Tags: [ { Key: "Environment", Value: "Production" }, { Key: "Department", Value: "Engineering" } ]});
User with Multiple Authentication Methods
Section titled “User with Multiple Authentication Methods”Create a MemoryDB user with multiple authentication methods for enhanced security.
const multiAuthMemoryDbUser = await AWS.MemoryDB.User("multiAuthMemoryDbUser", { UserName: "memoryUser3", AccessString: "on ~* +@all", AuthenticationMode: { Type: "iam", Passwords: ["AnotherSecurePassword456!"] }, Tags: [ { Key: "Project", Value: "MemoryDBMigration" } ]});
Adoption of Existing User Resource
Section titled “Adoption of Existing User Resource”Adopt an existing MemoryDB user instead of failing when the resource already exists.
const adoptExistingMemoryDbUser = await AWS.MemoryDB.User("existingUser", { UserName: "existingUser1", AccessString: "on ~* +@all", adopt: true});