AWS ec2 documentation change
Summary
Added PowerShell V5 examples for ModifyInstanceAttribute including security group modification, termination protection, and source/destination checks
Security assessment
Examples demonstrate security-related configurations (security groups, termination protection, source/destination checks) but do not address specific vulnerabilities or incidents
Diff
diff --git a/ec2/latest/devguide/example_ec2_ModifyInstanceAttribute_section.md b/ec2/latest/devguide/example_ec2_ModifyInstanceAttribute_section.md index b8199d8a7..e56b61cab 100644 --- a//ec2/latest/devguide/example_ec2_ModifyInstanceAttribute_section.md +++ b//ec2/latest/devguide/example_ec2_ModifyInstanceAttribute_section.md @@ -165,0 +166,50 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example modifies the instance type of the specified instance.** + + + Edit-EC2InstanceAttribute -InstanceId i-12345678 -InstanceType m3.medium + + +**Example 2: This example enables enhanced networking for the specified instance, by specifying "simple" as the value of the single root I/O virtualization (SR-IOV) network support parameter, -SriovNetSupport..** + + + Edit-EC2InstanceAttribute -InstanceId i-12345678 -SriovNetSupport "simple" + + +**Example 3: This example modifies the security groups for the specified instance. The instance must be in a VPC. You must specify the ID of each security group, not the name.** + + + Edit-EC2InstanceAttribute -InstanceId i-12345678 -Group @( "sg-12345678", "sg-45678901" ) + + +**Example 4: This example enables EBS I/O optimization for the specified instance. This feature isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.** + + + Edit-EC2InstanceAttribute -InstanceId i-12345678 -EbsOptimized $true + + +**Example 5: This example enables source/destination checking for the specified instance. For a NAT instance to perform NAT, the value must be 'false'.** + + + Edit-EC2InstanceAttribute -InstanceId i-12345678 -SourceDestCheck $true + + +**Example 6: This example disables termination for the specified instance.** + + + Edit-EC2InstanceAttribute -InstanceId i-12345678 -DisableApiTermination $true + + +**Example 7: This example changes the specified instance so that it terminates when shutdown is initiated from the instance.** + + + Edit-EC2InstanceAttribute -InstanceId i-12345678 -InstanceInitiatedShutdownBehavior terminate + + + * For API details, see [ModifyInstanceAttribute](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +