Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Databases supported by DuploCloud AWS
A number of databases are supported for DuploCloud and AWS. Use the procedures in this section to set them up.
Support for AWS Timestream databases
DuploCloud supports the Amazon Timestream database in the DuploCloud Portal. AWS Timestream is a fast, scalable, and serverless time-series database service that makes it easier to store and analyze trillions of events per day at an accelerated speed.
Amazon Timestream automatically scales to adjust for capacity and performance, so you don’t have to manage the underlying infrastructure.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
From the RDS page, click the Timestream tab.
Click Add. The Add Timestream Database pane displays.
Enter the DatabaseName.
Select an Encryption Key, if required.
Click Submit. The Timestream database name displays on the Timestream tab.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
From the RDS page, click the Timestream tab.
Select the database from the Name column.
On the Tables tab, click Add. The Add Timestream Table pane displays.
Enter the Table Name and other necessary information to size and create your table.
Click Create.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
From the RDS page, click the Timestream tab.
Select the database from the Name column.
On the Timestream page, click the database's Action menu to modify the JSON code or launch the Console in AWS. You can also select the database name in the Name column and, from the Tables tab, click the table's Action menu to modify the JSON code or launch the Console in AWS or Delete a table.
When using DynamoDB in DuploCloud AWS, the required permissions to access the DynamoDB from a virtual machine (VM), Lambda functions, and containers are provisioned automatically using Instance profiles. Therefore, no Access Key is required in the Application code.
When you write application code for DynamoDB in DuploCloud AWS, use the IAM role/Instance profile to connect to these services. If possible, use the AWS SDK constructor, which uses the region.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
Click the DynamoDB tab.
Click Add. The Create DynamoDB pane displays.
Specify the DynamoDB Table Name and other required fields, including Primary Key, Data Type, Sort Key, and Data Type.
Optionally, add Local Secondary Indexes (LSIs), which are indexes that use the same partition key as the base table, but allow you to use different sort keys. To add an LSI, click Add Local Index. The Add Local Secondary Index pane appears. Complete the fields: Sort Key, Data Type (String or Number), Index Name, and Projection (All, Only Keys, or Include). Click Add. Repeat to add additional secondary indexes.
Click Submit.
For detailed guidance about configuring the duplocloud_aws_dynamodb_table
, refer to the Terraform documentation. This resource allows for creating and managing AWS DynamoDB tables within DuploCloud.
Perform additional configuration, as needed, in the AWS Console by clicking the >_ Console icon. In the AWS console, you can configure the application-specific details of DynamoDB database tables. However, no access or security-level permissions are provided.
After creating a DynamoDB table, you can retrieve the final name of the table using the .fullname
attribute, which is available in the read-only section of the documentation. This feature is handy for applications that dynamically access table names post-creation. If you encounter any issues or need further assistance, please refer to the documentation or contact support.
Create ElastiCache for Redis database and Memcache memory caching
Amazon ElastiCache is a serverless, Redis- and Memcached-compatible caching service delivering real-time, cost-optimized performance for modern applications.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
Select the ElastiCache tab, and click Add. The Create a ElastiCache page displays.
Provide the database Name.
Select the number of replicas in the Replicas field.
In the Type list box, select Memcached.
Select the Memcache Version.
Select the node size in the Size list box.
Click Create. The Memcached ElastiCache instance is created.
Pass the cache endpoint to your application through the Environment Variables via the AWS Service.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
Select the ElastiCache tab, and click Add. The Create an ElastiCache page displays.
Provide the database Name.
Select the number of Replicas.
Optionally, if you selected more than 2 replicas, enable Automatic Failover. When automatic failover is enabled and the primary Redis node in the cluster fails, one of the read replicas is automatically promoted to become the new primary node.
Optionally, enable Cluster Mode.
In the Type field, select Redis.
In the Size list box, select the node size.
Optionally, complete the Redis Version, Parameter Group Name, KMS (Optional), Encryption At Transit, Snapshot Name, Snapshot ARNs, and Snapshot Retention Limit fields.
Optionally, click the CloudWatch link above the Log Delivery Configuration field to configure the Redis instance to deliver its engine logs to Amazon CloudWatch Logs. The Add CloudWatch Logs: Log Delivery Configuration pane displays. Complete the Log Format, Log Type, and Log Group fields. Click Add Config. The configuration is added to the Log Delivery Configuration field.
Click Create. The Redis database instance is created
When a Redis instance in an AWS environment is experiencing connection issues, ensure the Security Group (SG) configuration allows VPN traffic to port 6379
. Then, using the nc
command, verify the Redis instance's accessibility.
If you encounter local DNS resolution problems, consider changing your DNS provider or connecting directly using the Redis instance's IP address, which can be obtained via the dig
command.
For persistent DNS issues, resetting your router or using external DNS query tools may help. If other troubleshooting steps fail, exploring AWS network interfaces can offer additional insights.
Create and connect to an RDS database instance
Support for the Aurora Serverless V1 database engines has been deprecated. Do not create V1 engines when using Terraform.
DuploCloud supports the following RDS databases in AWS:
MySQL
PostgreSQL
MariaDB
Microsoft SQL-Express
Microsoft SQL-Web
Microsoft SQL-Standard
Aurora MySQL
Aurora MySQL Serverless
Aurora PostgreSQL
Aurora PostgreSQL Serverless
When upgrading RDS versions, use the AWS Console and see your Cloud Provider for compatibility requirements. Note that while versions 5.7.40, 5.7.41, and 5.7.42 cannot be upgraded to version 8.0.28, you can upgrade them to version 8.0.32 and higher.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
Click Add. The Create a RDS page displays.
Fill out the form based on your requirements, and Enable Logging if needed.
Optionally, in the Backup Retention Period in Days field, enter a number of days to retain automated backups between one (1) and thirty-five (35). If a value is not entered, the Backup Retention Period value configured in Systems Settings will be applied.
To create a publicly available RDS database, follow these steps.
You can create Aurora Serverless V2 Databases by selecting Aurora-MySql-Serverless-V2 or Aurora-PostgreSql-Serverless-V2 from the RDS Database Engine list box. Select the RDS Engine Version compatible with Aurora Serverless v2. The RDS Instance Size of db.serverless
applies to both engines.
Create a DB subnet group in AWS consisting only of public subnets from your VPC.
In the DuploCloud Portal, navigate to Cloud Services -> Databases
Select the RDS tab, and click Add. The Create a RDS page displays.
In the DB Subnet Group list box select the public DB subnet group you created in AWS.
Complete the remaining fields according to your requirements.
Click Create. The publicly available RDS database is created.
The DB subnet group created in AWS must contain only public subnets from your VPC. This configuration is crucial for making the database accessible publicly.
Once you create the database, select it and use the Instances tab to view the endpoint and credentials. Use the Endpoints and credentials to connect to the database from your application running in an EC2 instance. The database is only accessible from inside the EC2 instance in the current Tenant, including the containers running within.
For databases you intend to make publicly available, ensure proper security measures, including broad accessibility, are in place to protect your data.
Pass the endpoint, name, and credentials to your application using environment variables for maximum security.
Using IAM for secure log-ins to RDS databases
Authenticate to MySQL, PostgreSQL, Aurora MySQL, Aurora PostgreSQL, and MariaDB RDS instances using AWS Identity and Access Management (IAM) database authentication.
Using IAM for authenticating an RDS instance offers the following benefits:
Network traffic to and from the database is encrypted using Secure Socket Layer (SSL) or Transport Layer Security (TLS).
Centrally manage access to your database resources, instead of managing access individually for each DB instance.
For applications running on Amazon EC2 hosts, you can use profile credentials specific to your EC2 instance to access your database, instead of using a password, for greater security.
Use the System Config tab to enable IAM authentication before enabling it for a specific RDS instance.
In the DuploCloud Portal, navigate to Administrator -> System Settings.
Click the System Config tab. The Add Config pane displays.
From the Config Type list box, set Flags.
From the Key list box, select Enable RDS IAM auth.
From the Value list box, select True.
Click Submit. The configuration is displayed in the System Config tab.
You can also enable IAM for any MySQL, PostgreSQL, and MariaDB instance during RDS creation or by updating the RDS Settings after RDS creation.
Select the Enable IAM auth option when you create an RDS database.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
In the RDS tab, select the database for which you want to enable IAM.
Click the Actions menu and select RDS Settings -> Update IAM Auth. The Update IAM Auth pane displays.
Select Enable IAM Auth.
Click Update.
To download a token which you can use for IAM authentication:
In the DuploCloud Portal, navigate to Cloud Services -> Database.
In the RDS tab, select the database for which you want to enable IAM.
Click the Actions menu and select View -> Get DB Auth Token. The RDS Credentials window displays.
Click Close to dismiss the window.
Manage backup and restore for Relational Database Services (RDS)
In the DuploCloud Portal, navigate to Cloud Services -> Database.
Confirm the snapshot request. Once taken, the snapshot displays in the Snapshot tab.
You can restore available RDS snapshots to a specific point in time.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
Click the Snapshots tab.
Click the Actions menu and select Backup & Restore -> Restore to Point in Time. The Restore Point in Time pane displays.
In the Target Name field, append the RDS name to the prefilled TENANT_NAME
prefix.
Select either the Last Restorable Time or Custom date and time option. If you select the Custom date and time option, specify the date and time in the format indicated.
Click Submit. Your selected RDS is restored to the point in time you specified.
can set backup retention periods in the DuploCloud Portal.
In the DuploCloud Portal, navigate to Administrator -> System Settings.
Select the System Config tab.
Click Add. The Config pane displays.
From the Config Type list box, select AppConfig.
From the Key list box, select RDS Automated Backup Retention days.
In the Value field, enter the number of days to retain the backup, from one (1) to thirty-five (35) days.
Click Submit. The System Configs area in the System Config tab is updated with the retention period you entered for the RDS Automated Backup Retention days key.
The backup retention period new databases.
To update or skip the final snapshot, navigate to Cloud Services -> Database, and click the RDS tab. Select the name of the RDS database for which you want to update or skip the final snapshot.
From the Actions menu list box, select Backup & Restore -> Update Final Snapshot.
The Update Final Snapshot pane for the database displays. To skip the final snapshot upon database deletion, select Skip Final Snapshot. Click Update.
Steps for sharing encrypted RDS databases in DuploCloud AWS
Sharing unencrypted databases to other accounts is very simple and straightforward. Sharing an encrypted database is slightly more difficult. Here we will go through the steps that need to be followed to share the encrypted database.
Create a managed key that can be used by both accounts. Share the managed key with the destination account.
Copy the existing snapshot in the source account, but encrypt it with the new key.
Share the new snapshot with the destination account.
In the destination account, make a copy of the shared snapshot encrypted with the destination account's key.
Add the Name tag to the new copy in the destination so the DuploCloud portal recognizes it.
Create a new database from the snapshot.
Create a new customer-managed key in AWS KMS. In the Define key usage permissions area provide the account id of the other account.
Once the key is created, navigate to Cloud Services -> Database and select the RDS tab. From the Actions menu, select Manage Snapshots. Select the snapshot, and click Copy Snapshot. In the encryption, use the key we created above.
Once the copied snapshot is ready, share the snapshot with another account by clicking Share snapshot and providing the destination account id.
In the destination account, Navigate to Cloud Services -> Database and select the RDS tab. Select Shared with me. Select the shared snapshot and click copy-snapshot. Use the encryption key of the destination account, not the shared key.
In the copied snapshot add a tag with Key as “Name
” and Value as “duploservices-{tenantname}
” where tenantname
is the tenant where you want to launch an RDS with this snapshot.
Go to the DuploCloud portal and select the tenant. Navigate to Cloud Services -> Database and select the RDS tab. Click Add. Then give a name for the new database. In the snapshot select the new snapshot. Enter the instance type and click Submit. In a few minutes, the database will be created with the data from the snapshot. You must use the existing username and password to access the database.
You can manage RDS Snaphots from DuploCloud. Go to Navigate to Cloud Services -> Database and select the RDS tab. From the Actions menu, select Manage Snapshots.
The Manage Snapshots page shows the list of all manual and automated snapshots available within a Tenant. Additional details like owner and snapshot shared with the user are displayed. A user can also delete snapshots from this page.
You can view the Snapshot quota limits and numbers of snapshots used and available from this page.
Set a monitoring interval for an RDS database
Add or update a monitoring interval for an RDS database configuration.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
Click the RDS tab.
From the Monitoring Internal list box, select an interval, in seconds. To remove a previously set interval, select Disable.
Click Submit.
In the RDS Credentials window, click the Copy Icon ( ) to copy the Endpoint, Username, and Password to your clipboard.
Create a of an RDS.
In the RDS tab, in the row containing your RDS instance, click the Actions menu icon ( ) and select Backup & Restore -> Create Snapshot.
Once backups are available, you can restore them on the next instance creation when you .
In the RDS tab, select an RDS instance containing .
In the row for the RDS database that you want to update, click the ( ) icon in the Actions column, and select Update Monitoring Interval. The Update Monitoring Interval pane displays.
Create a read replica of your RDS database
Creating AWS RDS read replicas of your database helps you elastically scale your capacity to handle read-heavy workloads and ensure that your application can efficiently serve growing requests. Read replicas distribute read traffic across multiple instances, boosting performance by increasing aggregate read throughput and reducing the load on the primary database. Additionally, should the need arise, you can promote a read replica to a standalone database instance, enabling seamless failover and enhancing your overall database availability and resilience.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
Click the RDS tab.
Click on the name of the database you want to replicate in the NAME column.
From the Actions menu, select RDS Settings, and then Add Replica. The Add read replica to: DATABASE pane displays.
In the Read Replica Name field, provide a name for the replica (the Tenant name is prefixed automatically).
From the Instance Size list box, choose a size that meets or exceeds the specifications of the database you are replicating.
Click Create. Your replica displays on the RDS tab with a status of Submitted. When the replica is ready for use, the status changes to Available.
Transforming a read replica into a standalone primary instance allows it to accept write operations and maintain data integrity without relying on the original primary. This enhances database availability and efficient scaling. DuploCloud supports promoting read replicas for PostgreSQL, MySQL, and MariaDB databases.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
Select the RDS tab.
Click on the name of the database you want to promote from the NAME column.
In the Actions menu, select RDS Settings, and then Promote Replica.
Click Confirm in the confirmation dialog box. The promoted replica stops replicating from the primary instance and becomes a standalone database that can accept write operations.
Create a read replica of an Aurora database
Aurora database replica setup is slightly different from adding an RDS read replica.
In the DuploCloud Portal, navigate to Cloud Services -> Database.
Follow one of these procedures to complete the serverless and MySQL replicas setup.
In the Add Replica pane, enter a name for the Serverless replica in the Replica Name field.
In the RDS Engine field, select the Aurora RDS Serverless engine you want the replica to use.
Specify Min Capacity (ACUs) and Max Capacity (ACUs).
From the RDS Instance Size list box, select the appropriate instance size.
Click Save. The replica is created with a Reader role and displayed in the RDS tab.
To modify instance sizes for an existing Aurora Serverless replica:
In the DuploCloud Portal, navigate to Cloud Services -> Database and, in the RDS tab, locate the read replica you want to update in the Name column.
From the RDS Instance Size list box, select the appropriate instance size.
Click Save.
In the Add Replica pane, enter a name for the MySQL replica in the Replica Name field.
From the RDS Instance Size list box, select the appropriate instance size.
From the Availability Zone list box, select an availability zone
Click Save. The replica is created with a Reader role and displayed in the RDS tab.
Set a maximum instance size for an RDS
From the DuploCloud Portal, navigate to Administrator -> Systems Settings.
Select the System Config tab, and click Add. The Update Config AppConfig pane displays.
In the Config Type list box, select AppConfig.
From the Key list box, select RDS allowed max instance size.
From the Value list box, select the maximum instance size.
Click Submit. RDS instances will be limited to the maximum instance size configured.
Administrator can configure parameters for RDS Parameter Group for DB Instances and Clusters from Administrator -> System Settings -> System Config.
Turn logging on or off for an AWS RDS
You can enable or disable logging for an RDS database at any time, using the DuploCloud Portal.
In the DuploCloud Portal, navigate to Cloud Services -> Databases.
In the RDS tab, from the Name column, select the database for which you want to enable or disable logging.
Click the Actions menu, select RDS Settings, and then Update Logging. The Update Logging pane displays.
Select or deselect Enable Logging to turn logging on or off, respectively.
Click Update.
View the status of the EnableLogging attribute in the Details tab.
In the row of the RDS for which you want to add an Aurora read replica, click the ( ) icon, select RDS Settings, and then Add Replica. The Add Replica pane displays.
Click the ( ) icon in the Actions column and select Update Instance Size. The Update Instance Size pane displays.
Specify the Database Engines for auto creation of parameter groups. Administrator can set the supported parameters to override the values while creating RDS
To update logging for an RDS, you must select the Enable Logging option when you .