Explain how to use AWS CLI to create a new Amazon RDS instance and configure its security group to allow access from a specific IP address.

  • Create a security group in the target VPC.
  • Add an inbound rule allowing the required database port (3306 for MySQL, 5432 for PostgreSQL) from the specific IP address using /32 CIDR.
  • Create a DB subnet group if one does not exist.
  • Create the RDS instance using aws rds create-db-instance and attach the security group with --vpc-security-group-ids.
  • Enable --publicly-accessible if external connectivity is required.
  • Retrieve the endpoint using describe-db-instances and connect using the database client.
الرجاء تسجيل الدخول للسؤال والإجابة والمشاركة والإبداء والتصويت.