AWS::Neptune::DBInstance
The AWS::Neptune::DBInstance
type creates an Amazon Neptune DB instance.
Updating DB Instances
You can set a deletion policy for your DB instance to control how AWS CloudFormation handles the
instance when the stack is deleted. For Neptune DB instances, you can choose to
retain the instance, to delete the
instance, or to create a snapshot of the instance. The default
AWS CloudFormation behavior depends on the DBClusterIdentifier
property:
-
For
AWS::Neptune::DBInstance
resources that don't specify theDBClusterIdentifier
property, AWS CloudFormation saves a snapshot of the DB instance. -
For
AWS::Neptune::DBInstance
resources that do specify theDBClusterIdentifier
property, AWS CloudFormation deletes the DB instance.
Deleting DB Instances
Important
If a DB instance is deleted or replaced during an update, AWS CloudFormation deletes all automated snapshots. However, it retains manual DB snapshots. During an update that requires replacement, you can apply a stack policy to prevent DB instances from being replaced.
When properties labeled Update requires: Replacement are updated, AWS CloudFormation first creates a replacement DB instance, changes references from other dependent resources to point to the replacement DB instance, and finally deletes the old DB instance.
Important
We highly recommend that you take a snapshot of the database before updating the stack. If you don't, you lose the data when AWS CloudFormation replaces your DB instance. To preserve your data, perform the following procedure:
-
Deactivate any applications that are using the DB instance so that there's no activity on the DB instance.
-
Create a snapshot of the DB instance.
-
If you want to restore your instance using a DB snapshot, modify the updated template with your DB instance changes and add the
DBSnapshotIdentifier
property with the ID of the DB snapshot that you want to use. -
Update the stack.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Neptune::DBInstance", "Properties" : { "AllowMajorVersionUpgrade" :
Boolean
, "AutoMinorVersionUpgrade" :Boolean
, "AvailabilityZone" :String
, "DBClusterIdentifier" :String
, "DBInstanceClass" :String
, "DBInstanceIdentifier" :String
, "DBParameterGroupName" :String
, "DBSnapshotIdentifier" :String
, "DBSubnetGroupName" :String
, "PreferredMaintenanceWindow" :String
, "Tags" :[ Tag, ... ]
} }
YAML
Type: AWS::Neptune::DBInstance Properties: AllowMajorVersionUpgrade:
Boolean
AutoMinorVersionUpgrade:Boolean
AvailabilityZone:String
DBClusterIdentifier:String
DBInstanceClass:String
DBInstanceIdentifier:String
DBParameterGroupName:String
DBSnapshotIdentifier:String
DBSubnetGroupName:String
PreferredMaintenanceWindow:String
Tags:- Tag
Properties
AllowMajorVersionUpgrade
-
Indicates that major version upgrades are allowed. Changing this parameter doesn't result in an outage and the change is asynchronously applied as soon as possible. This parameter must be set to true when specifying a value for the EngineVersion parameter that is a different major version than the DB instance's current version.
Warning
When you change this parameter for an existing DB cluster, CloudFormation will replace your existing DB cluster with a new, empty one that uses the engine version you specified.
Required: No
Type: Boolean
Update requires: No interruption
AutoMinorVersionUpgrade
-
Indicates that minor version patches are applied automatically.
When updating this property, some interruptions may occur.
Required: No
Type: Boolean
Update requires: No interruption
AvailabilityZone
-
Specifies the name of the Availability Zone the DB instance is located in.
Required: No
Type: String
Update requires: Replacement
DBClusterIdentifier
-
If the DB instance is a member of a DB cluster, contains the name of the DB cluster that the DB instance is a member of.
Required: No
Type: String
Update requires: Replacement
DBInstanceClass
-
Contains the name of the compute and memory capacity class of the DB instance.
If you update this property, some interruptions may occur.
Required: Yes
Type: String
Update requires: Some interruptions
DBInstanceIdentifier
-
Contains a user-supplied database identifier. This identifier is the unique key that identifies a DB instance.
Required: No
Type: String
Update requires: Replacement
DBParameterGroupName
-
The name of an existing DB parameter group or a reference to an AWS::Neptune::DBParameterGroup resource created in the template. If any of the data members of the referenced parameter group are changed during an update, the DB instance might need to be restarted, which causes some interruption. If the parameter group contains static parameters, whether they were changed or not, an update triggers a reboot.
Required: No
Type: String
Update requires: No interruption
DBSnapshotIdentifier
-
This parameter is not supported.
AWS::Neptune::DBInstance
does not support restoring from snapshots.AWS::Neptune::DBCluster
does support restoring from snapshots.Required: No
Type: String
Update requires: Replacement
DBSubnetGroupName
-
A DB subnet group to associate with the DB instance. If you update this value, the new subnet group must be a subnet group in a new virtual private cloud (VPC).
Required: No
Type: String
Update requires: Replacement
PreferredMaintenanceWindow
-
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Required: No
Type: String
Update requires: No interruption
-
An arbitrary set of tags (key-value pairs) for this DB instance.
Required: No
Type: Array of Tag
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the resource name.
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt
intrinsic function, see Fn::GetAtt
.
Endpoint
-
The connection endpoint for the database. For example:
mystack-mydb-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com
. Port
-
The port number on which the database accepts connections. For example:
8182
.