title: How to determine ipv6 CIDR block prefix in AWS Cloudformation when creating subnets on a VPC
body: <p>AWS generates the ipv6 CIDR block for VPCs so its not possible to determine ahead of time. The generated CIDR block looks something like: <code>2a05:d018:84c:c500::/56</code> and is always size 56.</p>
  
  <p>When creating a subnet you have to specify a size 64 block using the full prefixed value. E.g. <code>2a05:d018:84c:c501::/64</code>.</p>
  
  <p>It's possible to look up the ipv6 CIDR blocks for a VPC in cloudformation, but this returns the full value, not just the prefix. To create a subnet we need to be able to append something <code>01::/64</code> to the prefix to create the 64 sized block for the subnet.</p>
  
  <p>I've seen solutions that use a lambda function, but this greatly complicated the templates. I'd like to do this using just the built-in intrinsic functions available in the templates.</p>
  
  <p>When deploying a VPC with ipv6 subnets in the same stack, how can you generate valid ipv6 CIDR blocks for the subnets?</p>