AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2025-07-01 · Documentation low

File: code-library/latest/ug/csharp_3_aurora_code_examples.md

Summary

Removed 'Basics' and 'Actions' sections, consolidated code examples into a single scenario demonstrating full Aurora cluster lifecycle management including parameter group creation, cluster/instance creation, snapshotting, and cleanup

Security assessment

The changes restructure documentation but don't address specific security vulnerabilities. While the code demonstrates credential input (username/password), this is standard operational documentation rather than security feature introduction or vulnerability mitigation

Diff

diff --git a/code-library/latest/ug/csharp_3_aurora_code_examples.md b/code-library/latest/ug/csharp_3_aurora_code_examples.md
index 0297055a3..dd5d3524b 100644
--- a//code-library/latest/ug/csharp_3_aurora_code_examples.md
+++ b//code-library/latest/ug/csharp_3_aurora_code_examples.md
@@ -5 +5 @@
-BasicsActionsScenarios
+Scenarios
@@ -13,4 +12,0 @@ The following code examples show you how to perform actions and implement common
-_Basics_ are code examples that show you how to perform the essential operations within a service.
-
-_Actions_ are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.
-
@@ -21,51 +16,0 @@ Each example includes a link to the complete source code, where you can find ins
-**Get started**
-
-The following code examples show how to get started using Aurora.
-
-**SDK for .NET**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv3/Aurora#code-examples). 
-    
-    
-    using Amazon.RDS;
-    using Amazon.RDS.Model;
-    using Microsoft.Extensions.DependencyInjection;
-    using Microsoft.Extensions.Hosting;
-    
-    namespace AuroraActions;
-    
-    public static class HelloAurora
-    {
-        static async Task Main(string[] args)
-        {
-            // Use the AWS .NET Core Setup package to set up dependency injection for the
-            // Amazon Relational Database Service (Amazon RDS).
-            // Use your AWS profile name, or leave it blank to use the default profile.
-            using var host = Host.CreateDefaultBuilder(args)
-                .ConfigureServices((_, services) =>
-                    services.AddAWSService<IAmazonRDS>()
-                ).Build();
-    
-            // Now the client is available for injection. Fetching it directly here for example purposes only.
-            var rdsClient = host.Services.GetRequiredService<IAmazonRDS>();
-    
-            // You can use await and any of the async methods to get a response.
-            var response = await rdsClient.DescribeDBClustersAsync(new DescribeDBClustersRequest { IncludeShared = true });
-            Console.WriteLine($"Hello Amazon RDS Aurora! Let's list some clusters in this account:");
-            foreach (var cluster in response.DBClusters)
-            {
-                Console.WriteLine($"\tCluster: database: {cluster.DatabaseName} identifier: {cluster.DBClusterIdentifier}.");
-            }
-        }
-    }
-    
-    
-
-  * For API details, see [DescribeDBClusters](https://docs.aws.amazon.com/goto/DotNetSDKV3/rds-2014-10-31/DescribeDBClusters) in _AWS SDK for .NET API Reference_. 
-
-
-
-
@@ -74,4 +18,0 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-  * Basics
-
-  * Actions
-
@@ -83,1608 +23,0 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-## Basics
-
-The following code example shows how to:
-
-  * Create a custom Aurora DB cluster parameter group and set parameter values.
-
-  * Create a DB cluster that uses the parameter group.
-
-  * Create a DB instance that contains a database.
-
-  * Take a snapshot of the DB cluster, then clean up resources.
-
-
-
-
-**SDK for .NET**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv3/Aurora#code-examples). 
-
-Run an interactive scenario at a command prompt.
-    
-    
-    using Amazon.RDS;
-    using Amazon.RDS.Model;
-    using AuroraActions;
-    using Microsoft.Extensions.DependencyInjection;
-    using Microsoft.Extensions.Hosting;
-    using Microsoft.Extensions.Logging;
-    using Microsoft.Extensions.Logging.Console;
-    using Microsoft.Extensions.Logging.Debug;
-    
-    namespace AuroraScenario;
-    
-    /// <summary>
-    /// Scenario for Amazon Aurora examples.
-    /// </summary>
-    public class AuroraScenario
-    {
-        /*
-        Before running this .NET code example, set up your development environment, including your credentials.
-    
-        This .NET example performs the following tasks:
-        1.  Return a list of the available DB engine families for Aurora MySql using the DescribeDBEngineVersionsAsync method.
-        2.  Select an engine family and create a custom DB cluster parameter group using the CreateDBClusterParameterGroupAsync method.
-        3.  Get the parameter group using the DescribeDBClusterParameterGroupsAsync method.
-        4.  Get some parameters in the group using the DescribeDBClusterParametersAsync method.
-        5.  Parse and display some parameters in the group.
-        6.  Modify the auto_increment_offset and auto_increment_increment parameters
-            using the ModifyDBClusterParameterGroupAsync method.
-        7.  Get and display the updated parameters using the DescribeDBClusterParametersAsync method with a source of "user".
-        8.  Get a list of allowed engine versions using the DescribeDBEngineVersionsAsync method.
-        9.  Create an Aurora DB cluster that contains a MySql database and uses the parameter group.
-            using the CreateDBClusterAsync method.
-        10. Wait for the DB cluster to be ready using the DescribeDBClustersAsync method.
-        11. Display and select from a list of instance classes available for the selected engine and version
-            using the paginated DescribeOrderableDBInstanceOptions method.
-        12. Create a database instance in the cluster using the CreateDBInstanceAsync method.
-        13. Wait for the DB instance to be ready using the DescribeDBInstances method.
-        14. Display the connection endpoint string for the new DB cluster.
-        15. Create a snapshot of the DB cluster using the CreateDBClusterSnapshotAsync method.
-        16. Wait for DB snapshot to be ready using the DescribeDBClusterSnapshotsAsync method.
-        17. Delete the DB instance using the DeleteDBInstanceAsync method.
-        18. Delete the DB cluster using the DeleteDBClusterAsync method.
-        19. Wait for DB cluster to be deleted using the DescribeDBClustersAsync methods.
-        20. Delete the cluster parameter group using the DeleteDBClusterParameterGroupAsync.
-        */
-    
-        private static readonly string sepBar = new('-', 80);
-        private static AuroraWrapper auroraWrapper = null!;
-        private static ILogger logger = null!;
-        private static readonly string engine = "aurora-mysql";
-        static async Task Main(string[] args)
-        {
-            // Set up dependency injection for the Amazon Relational Database Service (Amazon RDS).
-            using var host = Host.CreateDefaultBuilder(args)
-                .ConfigureLogging(logging =>
-                    logging.AddFilter("System", LogLevel.Debug)
-                        .AddFilter<DebugLoggerProvider>("Microsoft", LogLevel.Information)
-                        .AddFilter<ConsoleLoggerProvider>("Microsoft", LogLevel.Trace))
-                .ConfigureServices((_, services) =>
-                    services.AddAWSService<IAmazonRDS>()
-                        .AddTransient<AuroraWrapper>()
-                )
-                .Build();
-    
-            logger = LoggerFactory.Create(builder =>
-            {
-                builder.AddConsole();
-            }).CreateLogger<AuroraScenario>();
-    
-            auroraWrapper = host.Services.GetRequiredService<AuroraWrapper>();
-    
-            Console.WriteLine(sepBar);
-            Console.WriteLine(
-                "Welcome to the Amazon Aurora: get started with DB clusters example.");
-            Console.WriteLine(sepBar);
-    
-            DBClusterParameterGroup parameterGroup = null!;
-            DBCluster? newCluster = null;
-            DBInstance? newInstance = null;
-    
-            try
-            {
-                var parameterGroupFamily = await ChooseParameterGroupFamilyAsync();
-    
-                parameterGroup = await CreateDBParameterGroupAsync(parameterGroupFamily);
-    
-                var parameters = await DescribeParametersInGroupAsync(parameterGroup.DBClusterParameterGroupName,
-                    new List<string> { "auto_increment_offset", "auto_increment_increment" });
-    
-                await ModifyParametersAsync(parameterGroup.DBClusterParameterGroupName, parameters);
-    
-                await DescribeUserSourceParameters(parameterGroup.DBClusterParameterGroupName);
-    
-                var engineVersionChoice = await ChooseDBEngineVersionAsync(parameterGroupFamily);
-    
-                var newClusterIdentifier = "Example-Cluster-" + DateTime.Now.Ticks;
-    
-                newCluster = await CreateNewCluster
-                (
-                    parameterGroup,
-                    engine,
-                    engineVersionChoice.EngineVersion,
-                    newClusterIdentifier
-                );
-    
-                var instanceClassChoice = await ChooseDBInstanceClass(engine, engineVersionChoice.EngineVersion);