question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enabling IPv6 on Resources and VPCs

See original GitHub issue

Hi,

I’m just starting out to play with the SDK, please forgive if I a missing something. First off, I’d like to probably point out how great this product is and I see a bright future for it. It’s in the early stages and I understand things will be missing. This is not a complaint, just something I noticed while attempting to create an IPv6 enabled app.

It seems like the ability to map an amazonProvidedIpv6CidrBlock is missing within the @aws-cdk/aws-ec2 VpcNetwork construct as well as within the SubnetConfiguration interface.

Something along the lines of the below would be helpful.

import * as ec2 from "@aws-cdk/aws-ec2";

new ec2.VpcNetwork(this, name, {
// other attributes
  amazonProvidedIpv6CidrBlock: true,
// other attributes
}

Other values left out on purpose just to keep this concise.

From the subnetConfiguration[] it would be helpful to have.

import * as ec2 from "@aws-cdk/aws-ec2";

new ec2.VpcNetwork(this, name, {
// other attributes
  subnetConfiguration: [
    {
      name: "pub",
      cidrMask: 22,
      ipv6Cidr: true,
      mapIPv6OnLaunch: true,
      subnetType: ec2.SubnetType.Public
    }
  ]
// other attributes
}

The ipv6Cidr could be a boolean since all subnet cidrs must be /64 and then the obvious addition to map IPv6 address to instances within those subnet .

To get the amazonProvidedIpv6CidrBlock within the created VpcNetwork I had to do something like this, and in testing, it seems to work. Though going through the documentation, it’s advised to use native constructs, which I’d agree completely.

this.vpc = new ec2.VpcNetwork(this, `${name}Vpc`, args);
new ec2.cloudformation.VPCCidrBlockResource(
  this,
  `CidrRes`,
  {
    vpcId: this.vpc.vpcId,
    amazonProvidedIpv6CidrBlock: true
  }
);

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:42
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

23reactions
dbolotincommented, Oct 25, 2020

This is pretty unexpected that IPv6 is just not supported in the CDKs core networking construct.

8reactions
rverma-nslcommented, Jun 1, 2021

Actually our whole usecase is to have exposable ipv6, to replace NAT with free of cost egress only internet gateway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrate existing VPCs from IPv4 to IPv6 - AWS Documentation
If you have an existing VPC that supports IPv4 only, and resources in your subnet that are configured to use IPv4 only, you...
Read more >
Fundamentals of IPv6 - Enable IPv6 Support for your VPC ...
In an IPv6 enabled VPC, all IPv6 addresses are considered public addresses. By default, AWS VPCs and EC2 instances use IPv4 addressing. The...
Read more >
Create an IPv6-enabled VPC and IPv6-only subnets using ...
Step 1: Create a VPC and subnets · Step 2: Configure a public subnet · Step 3: Configure an egress-only private subnet ·...
Read more >
Enable IPv6 for a VPC - IPv6 Gateway
Enable IPv6 for a VPC,IPv6 Gateway:When you create a virtual private cloud (VPC), you can specify an IPv4 CIDR block and specify whether...
Read more >
Dual Stack and IPv6-only Amazon VPC Reference Architectures
subnet CIDR. Note that security groups must allow both IPv4 and IPv6 traffic. Resources in private dual stack subnets use.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found