AWS Security ChangesHomeSearch

AWS code-library documentation change

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

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

Summary

Removed 'Get started' section containing C# code example for EC2 DescribeSecurityGroups operation

Security assessment

The change deletes a security group listing example but shows no evidence of addressing security vulnerabilities. While security groups are security-related infrastructure, the documentation change itself doesn't indicate any security fixes or new security guidance.

Diff

diff --git a/code-library/latest/ug/csharp_3_ec2_code_examples.md b/code-library/latest/ug/csharp_3_ec2_code_examples.md
index 6d6bfb75e..ec5f5244a 100644
--- a//code-library/latest/ug/csharp_3_ec2_code_examples.md
+++ b//code-library/latest/ug/csharp_3_ec2_code_examples.md
@@ -21,76 +20,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 Amazon EC2.
-
-**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/EC2#code-examples). 
-    
-    
-    namespace EC2Actions;
-    
-    public class HelloEc2
-    {
-        /// <summary>
-        /// HelloEc2 lists the existing security groups for the default users.
-        /// </summary>
-        /// <param name="args">Command line arguments</param>
-        /// <returns>Async task.</returns>
-        static async Task Main(string[] args)
-        {
-            // Set up dependency injection for Amazon Elastic Compute Cloud (Amazon EC2).
-            using var host = Microsoft.Extensions.Hosting.Host.CreateDefaultBuilder(args)
-                .ConfigureServices((_, services) =>
-                    services.AddAWSService<IAmazonEC2>()
-                    .AddTransient<EC2Wrapper>()
-                )
-                .Build();
-    
-            // Now the client is available for injection.
-            var ec2Client = host.Services.GetRequiredService<IAmazonEC2>();
-    
-            try
-            {
-                // Retrieve information for up to 10 Amazon EC2 security groups.
-                var request = new DescribeSecurityGroupsRequest { MaxResults = 10, };
-                var securityGroups = new List<SecurityGroup>();
-    
-                var paginatorForSecurityGroups =
-                    ec2Client.Paginators.DescribeSecurityGroups(request);
-    
-                await foreach (var securityGroup in paginatorForSecurityGroups.SecurityGroups)
-                {
-                    securityGroups.Add(securityGroup);
-                }
-    
-                // Now print the security groups returned by the call to
-                // DescribeSecurityGroupsAsync.
-                Console.WriteLine("Welcome to the EC2 Hello Service example. " +
-                                  "\nLet's list your Security Groups:");
-                securityGroups.ForEach(group =>
-                {
-                    Console.WriteLine(
-                        $"Security group: {group.GroupName} ID: {group.GroupId}");
-                });
-            }
-            catch (AmazonEC2Exception ex)
-            {
-                Console.WriteLine($"An Amazon EC2 service error occurred while listing security groups. {ex.Message}");
-            }
-            catch (Exception ex)
-            {
-                Console.WriteLine($"An error occurred while listing security groups. {ex.Message}");
-            }
-        }
-    }
-    
-    
-
-  * For API details, see [DescribeSecurityGroups](https://docs.aws.amazon.com/goto/DotNetSDKV3/ec2-2016-11-15/DescribeSecurityGroups) in _AWS SDK for .NET API Reference_. 
-
-
-
-