IPv6 addressing with Amazon Redshift


As we witness the gradual transition from IPv4 to IPv6, Amazon Net Companies (AWS) continues to increase its assist for dual-stack networking throughout its service portfolio. On this publish, we present how one can migrate your Amazon Redshift Serverless workgroup from IPv4-only to dual-stack mode, so you may make your information warehouse future prepared.

An IP tackle serves as a digital id for units linked to the web. This distinctive numerical identifier allows units to speak throughout IP-based networks, facilitating the alternate of knowledge packets between supply and vacation spot.

Immediately’s web operates on two IP variations:

  • IPv4 – The standard 32-bit addressing system (similar to 192.168.0.22) that has powered web communications for over three a long time. With roughly 4 billion doable addresses (2³²), IPv4’s limitations have turn out to be more and more obvious as our digital surroundings expands.
  • IPv6 – The subsequent-generation 128-bit addressing system (similar to 2606:4700::6810:787f) affords an astronomical variety of distinctive addresses (340 undecillion or 2¹²⁸). This just about limitless tackle area is designed to accommodate the explosive progress of internet-connected units.

Within the case of Amazon Redshift, dual-stack networking permits Redshift workgroups to speak over each IPv4 and IPv6 protocols concurrently. This networking structure permits Redshift workgroups to be accessible utilizing each IPv4 and IPv6 addresses, offering higher flexibility and future-proofing for community communications. Twin-stack networking offers the next benefits:

  1. Future-proofing – Facilitates compatibility with each IPv4 methods and trendy IPv6 networks
  2. Enhanced connectivity – Offers extra versatile networking choices for numerous shopper purposes

Allow dual-stack networking for Amazon Redshift

An Amazon Redshift workgroup working in dual-stack mode has each IPv4 and IPv6 addresses related to the database endpoints. We’ve launched a brand new API discipline referred to as ipAddressTypewithin the Amazon Redshift API that provides you direct management over your workgroup’s community configuration. Now you can particularly select whether or not your Amazon Redshift occasion operates in IPv4-only mode or dual-stack mode. For full implementation particulars, check with the ipAddressType parameter within the Amazon Redshift API Reference.

Greatest observe

When implementing dual-stack networking in Amazon Redshift, deploy your workgroups in personal subnets with digital personal cloud (VPC) endpoints for optimum safety and compatibility. This strategy aligns with the present Amazon Redshift assist mannequin, which requires dual-stack databases to function in personal mode solely. Amazon Redshift doesn’t presently assist databases with IPv6-only endpoints or publicly accessible dual-stack cases.

Stipulations

To implement dual-stack networking in Amazon Redshift, it is advisable have the next conditions:

  • An present Amazon Redshift serverless workgroups working in IPv4-only mode that you simply wish to convert to dual-stack mode
  • Administrative permissions to switch Amazon Redshift workgroup community configurations
  • VPC with each IPv4 and IPv6 CIDR blocks assigned

Allow IPv6 assist in your VPC subnets

Earlier than migrating your Amazon Redshift Serverless workgroup to dual-stack mode, it’s essential to first make sure that your VPC subnets assist IPv6 addressing. On this part, we stroll via the method of enabling IPv6 CIDR blocks in your VPC.

Present VPC Subnets

To allow dual-stack mode in your present VPC observe these 5 high-level steps:

  1. Entry the VPC dashboard
  2. Navigate to the subnet settings
  3. Add the IPv6 CIDR block
  4. Repeat for the required subnets
  5. Confirm IPv6 CIDR affiliation

To entry the VPC dashboard:

  1. Sign up to your account on the AWS Administration Console
  2. Within the search bar on the high, kind VPC
  3. Select VPC from the dropdown checklist to navigate to the Amazon Digital Non-public Cloud (Amazon VPC) dashboard

To navigate to subnet settings:

  1. Within the left navigation panel beneath Digital personal cloud, select Subnets
  2. From the subnet checklist, determine and choose the subnet(s) that your Amazon Redshift Serverless workgroup makes use of or will use

So as to add the IPv6 CIDR block:

  1. Along with your subnet chosen, select Actions within the dropdown checklist
  2. Select Edit IPv6 CIDRs from the accessible choices
  3. Within the configuration panel that seems, select Add IPv6 CIDR
  4. The system will routinely counsel an applicable IPv6 CIDR block allocation
  5. Select Save to use the modifications

Repeat for the required subnets. You should modify the subnets throughout the VPC that will likely be utilized by your Amazon Redshift sources. Repeat high-level steps 2–3 for every subnet in your Amazon Redshift subnet group.

Confirm the IPv6 CIDR affiliation. After finishing the configuration, confirm that every subnet shows each IPv4 and IPv6 CIDR blocks within the subnet particulars. Your subnet particulars ought to present one thing like the next snippet:IPv4 CIDR: 10.0.0.0/24IPv6 CIDR: 2600:1f16:c72:9d00::/64

After you’ve efficiently configured IPv6 CIDR blocks for the related subnets, you’re able to proceed with enabling dual-stack mode in your Amazon Redshift Serverless workgroup.

New VPC Subnets

To allow dual-stack mode in a brand new VPC, observe these steps:

  1. To create a dual-stack VPC, add the --amazon-provided-ipv6-cidr-block possibility so as to add an Amazon supplied IPv6 CIDR block, as proven within the following instance:
    aws ec2 create-vpc --cidr-block 10.0.0.0/24 
    --amazon-provided-ipv6-cidr-block 
    --query Vpc.VpcId 
    --output textual content

  2. [Dual stack VPC] Get the IPv6 CIDR block that’s related along with your VPC through the use of the next describe-vpcs command:
    aws ec2 describe-vpcs --vpc-id vpcxxxxx 
    --query Vpcs[].Ipv6CidrBlockAssociationSet[].Ipv6CidrBlock 
    --output textual content

  3. When you created a dual-stack VPC, you need to use the --ipv6-cidr-block choice to create a twin stack subnet, as proven within the following command:
    aws ec2 create-subnet --vpc-id vpc-xxx 
    --cidr-block 10.0.1.0/20 
    --ipv6-cidr-block 2600:1f13:cfe:3600::/64 
    --availability-zone us-east-2a 
    --query Subnet.SubnetId 
    --output textual content

Migrate an present Amazon Redshift Serverless workgroup from IPv4 to IPv6

To allow dual-stack mode in your Amazon Redshift Serverless workgroup, observe these 5 high-level steps:

  1. Entry Amazon Redshift Serverless
  2. Choose your workgroup
  3. Entry community and safety settings
  4. Allow dual-stack mode
  5. Confirm the configuration

To entry Amazon Redshift Serverless:

  1. Sign up to AWS Administration Console utilizing your credentials.
  2. Within the search bar on the high of the console, enter Redshift.
  3. Select Amazon Redshift within the dropdown checklist. This may take you to the Amazon Redshift dashboard. Verify Ensure you’re on the Redshift Serverless dashboard view

To pick out your workgroup:

  1. Within the Redshift Serverless dashboard, find the Workgroups part
  2. Choose the title of the precise workgroup you wish to modify

To entry community and safety settings:

  1. On the workgroup particulars web page, find the horizontal navigation tabs
  2. Subsequent to the Question and database monitoring part, select the Information entry tab
  3. Select Edit to entry the Edit community and safety web page

To allow dual-stack mode:

  1. Within the community settings part, find the IP tackle kind choices
  2. Select Twin-stack mode. This allows connectivity for each IPv4 and IPv6
  3. Select Save modifications on the backside of the web page

To confirm the configuration:

After the modifications are utilized, you’ll be returned to the workgroup particulars web page. Verify that your workgroup now shows Twin-stack mode in its community settings, as proven within the following screenshot.

Your Amazon Redshift Serverless workgroup is now configured to assist each IPv4 and IPv6 visitors. This configuration permits your Redshift Serverless workgroup to speak over each IPv4 and IPv6 protocols, offering higher flexibility in your community connectivity choices.

Entry Redshift dual-stack serverless workgroups

Redshift dual-stack workgroups keep the identical entry strategies no matter whether or not you’re connecting utilizing IPv4 or IPv6. Your present connection endpoints stay unchanged.

To entry a Redshift dual-stack workgroups from an Amazon Elastic Compute Cloud (Amazon EC2) occasion, observe these steps:

  1. Create an IPv4 EC2 occasion.
  2. Add the related EC2 safety group to your Redshift workgroup’s safety group inbound guidelines.
  3. Connect with your EC2 occasion. Log in to your EC2 occasion on the AWS console to put in the psql shopper to check the database connectivity. Enter the next instructions from the terminal window:
    # Replace your system packages
    sudo dnf replace -y
    # Set up the PostgreSQL 15 repository
    sudo dnf set up -y postgresql15
    # Confirm the set up
    psql –model

    Connect with your Redshift workgroup utilizing utility person

    psql -h your-redshift-endpoint -U your-username -d your-database -p 5439

    Enter password when prompted

  4. Enter pattern queries, as proven within the following:
    SELECT * FROM your_table LIMIT 10;

  5. Validate the IPv4 connection utilizing the next SQL by changing your related IPv4 EC2 occasion IP tackle:
    SELECT * FROM sys_connection_log the place user_name="admin" 
    and remote_host like '%172.31.83.132%' order by record_time desc;

  6. Execute an identical validation steps in your IPv6-enabled EC2 occasion to confirm that each one performance operates accurately with the IPv6 protocol stack utilizing the previous instructions.

Create dual-stack mode in Amazon Redshift Serverless utilizing AWS CLI

You’ll be able to create a brand new dual-stack mode in Amazon Redshift Serverless utilizing AWS Command Line Interface (AWS CLI). Observe these high-level steps:

  1. Create a namespace
  2. Create a workgroup
  3. Confirm the workgroup is ready up in dual-stack mode

To create namespace, enter the next code:

export AWS_USE_DUALSTACK_ENDPOINT=true
aws redshift-serverless create-namespace 
--region us-east-1 
--namespace-name ipv6-demo 
--admin-username xxx  
--admin-user-password "yyyyyyy"

To create workgroup, enter the next code:

aws redshift-serverless create-workgroup 
--workgroup-name ipv6-demo-wg 
--namespace-name ipv6-demo 
--region us-east-1 
--subnet-ids subnet-ppppppp subnet-qqqqqq 
--ip-address-type dualstack

To confirm the workgroup is ready up in dual-stack mode, check with the steps within the earlier part.

Clear up

To scrub up your sources, full the next steps:

  1. On the Amazon Redshift Serverless console, delete the Amazon Redshift workgroups and namespaces
  2. On the Amazon EC2 console, terminate the EC2 cases

Conclusion

On this publish, we’ve explored the potential of Amazon Redshift Serverless to assist IPv6 addressing via dual-stack mode, marking a major development within the AWS information warehouse networking flexibility.

We’ve walked via the entire migration journey, from getting ready your VPC subnets with IPv6 CIDR blocks to configuring your Amazon Redshift Serverless workgroup for dual-stack operation. The method is simple. Though IPv6-only configurations aren’t but supported for Amazon Redshift, the dual-stack strategy offers a really perfect transition path, sustaining compatibility with present IPv4 methods whereas introducing IPv6 capabilities. Do not forget that dual-stack configurations are presently restricted to personal entry mode, with public accessibility not but supported for dual-stack cases.

By migrating to dual-stack mode now, you may make certain your Amazon Redshift surroundings stays optimally linked, addressable, and able to assist your group’s information analytics wants properly into the longer term—no matter how web addressing protocols proceed to evolve.

You probably have questions or strategies on the content material coated on this publish, go away them within the feedback part.


In regards to the authors

Srini Ponnada

Srini Ponnada

Srini is a Sr. Information Architect at AWS. He has helped clients construct scalable information warehousing and large information options for over 20 years. He likes to design and construct environment friendly end-to-end options on AWS.

Ji Yanzhu

Yanzhu Ji

Ji Yanzhu is a Senior Product Supervisor on the Amazon Redshift crew. She has intensive expertise in database safety and creating product imaginative and prescient and technique for industry-leading information merchandise and platforms. She excels at constructing strong software program merchandise utilizing net improvement, system design, database, and distributed programming methods.

Hua Zirui

Hua Zirui

Zirui Hua is a Software program Growth Engineer for Amazon Redshift, the place he works on creating subsequent technology options for Amazon Redshift. His important focuses are on networking and proxy of database. Outdoors of labor, he likes to play tennis and basketball.

Sandeep Adwankar

Sandeep Adwankar

Sandeep is a Senior Product Supervisor at AWS. Primarily based within the California Bay Space, he works with clients across the globe to translate enterprise and technical necessities into merchandise that allow clients to enhance how they handle, safe, and entry information.

Sumanth Punyamurthula

Sumanth Punyamurthula

Sumanth is a Senior Information and Analytics Architect at AWS with greater than 20 years of expertise in main massive analytical initiatives, together with analytics, information warehouse, information lakes, information governance, safety, and cloud infrastructure throughout journey, hospitality, monetary, and healthcare industries.

Niranjan Kulkarni

Niranjan Kulkarni

Niranjan is a Software program Growth Engineer for Amazon Redshift. He focuses on Amazon Redshift Serverless adoption and Amazon Redshift security-related options. Outdoors of labor, he spends time together with his household and enjoys watching high-quality TV sequence.