Skip to content
GitHubXDiscord

Account

The Account resource lets you manage AWS CertificateManager Accounts for configuring certificate expiry notifications and other settings.

Create a basic AWS CertificateManager Account with required properties.

import AWS from "alchemy/aws/control";
const account = await AWS.CertificateManager.Account("default-account", {
ExpiryEventsConfiguration: {
DaysBeforeExpiry: 30,
NotificationTarget: "arn:aws:sns:us-west-2:123456789012:MySNSTopic",
SnsTopicArn: "arn:aws:sns:us-west-2:123456789012:MySNSTopic"
},
adopt: true // Adopt existing resource if it already exists
});

Configure an AWS CertificateManager Account with a custom expiry event notification setup.

const advancedAccount = await AWS.CertificateManager.Account("advanced-account", {
ExpiryEventsConfiguration: {
DaysBeforeExpiry: 15,
NotificationTarget: "email",
SnsTopicArn: "arn:aws:sns:us-west-2:123456789012:MyEmailNotificationTopic"
},
adopt: false // Do not adopt existing resource
});

Demonstrate how to adopt an existing AWS CertificateManager Account without creating a new one.

const existingAccount = await AWS.CertificateManager.Account("existing-account", {
ExpiryEventsConfiguration: {
DaysBeforeExpiry: 45,
NotificationTarget: "sms",
SnsTopicArn: "arn:aws:sns:us-west-2:123456789012:MySMSNotificationTopic"
},
adopt: true // This will adopt the existing resource
});