AWS RDS VPC ID Through Powershell

Vinothkumar R 21 Reputation points
2022-09-08T05:37:34.487+00:00

How to get AWS RDS VPC ID through Powershell.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. Takahito Iwasa 4,851 Reputation points MVP Volunteer Moderator
    2022-09-08T22:25:38+00:00

    Hi, @Vinothkumar R

    AWS CLI using Powershell

    You can also use the AWS CLI with PowerShell.

       % pwsh  
       PowerShell 7.2.6  
       Copyright (c) Microsoft Corporation.  
         
       https://aka.ms/powershell  
       Type 'help' to get help.  
         
       PS /Users/iwasa.takahito> aws rds describe-db-instances --db-instance-identifier hoge-db  
       {  
           "DBInstances": [  
               {  
                   "DBInstanceIdentifier": "hoge-db",  
                   "DBInstanceClass": "db.t3.small",  
                   "Engine": "aurora-mysql",  
       :  
                   "DBSubnetGroup": {  
                       "DBSubnetGroupName": "default",  
                       "DBSubnetGroupDescription": "default",  
                       "VpcId": "vpc-3b4cab5d",  
                       "SubnetGroupStatus": "Complete",  
       :  
    

    AWS Toolkit for Powershell

    Use the Select parameter to access DBInstances.DBSubnetGroup.

    According to Get-RDSDBInstance , Select defaults to DBInstances.

    https://docs.aws.amazon.com/powershell/latest/reference/items/Get-RDSDBInstance.html

       PS /Users/iwasa.takahito> Get-RDSDBInstance -DBInstanceIdentifier hoge-db -Select 'DBInstances.DBSubnetGroup'     
         
       DBSubnetGroupArn         :   
       DBSubnetGroupDescription : default  
       DBSubnetGroupName        : default  
       SubnetGroupStatus        : Complete  
       Subnets                  : {Amazon.RDS.Model.Subnet, Amazon.RDS.Model.Subnet, Amazon.RDS.Model.Subnet}  
       SupportedNetworkTypes    : {}  
       VpcId                    : vpc-3b4cab5d  
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.