Aws-cdk: cli: Availability zones in cdk.context.json

Created on 3 Apr 2020  路  3Comments  路  Source: aws/aws-cdk

In my opinion, Availability Zones in cdk.context.json should not include the account number. Availability Zones are region specific, not account specific.

Kind of related to #6929.

Reproduction Steps

Example cdk.context.json after deploying a stack that uses/creates VPCs.

{
  "availability-zones:account=<AccountId>:region=us-east-1": [
    "us-east-1a",
    "us-east-1b",
    "us-east-1c",
    "us-east-1d",
    "us-east-1e",
    "us-east-1f"
  ]
}

Error Log

N/A

Environment

  • CLI Version : 1.31.0
  • Framework Version: 1.31.0
  • OS : macOS
  • Language : TypeScript

Other


This is :bug: Bug Report

bug needs-triage p2

Most helpful comment

Thanks @iph for that jam! Im sure this issue, although closed will develop a life of it's own in the internet :)

All 3 comments

Availability Zone Names are account specific, surprisingly.

Pre...2018~ish (maybe earlier), they were shuffled where if you had a datacenter in iad , it could be mapped to us-east-1b in one account and us-east-1a in another account. When making cross-account VPC Peering that align with the datacenter (gotta get that low latency!) this is very important to map correctly on an account level, which may require sorting these based on the shuffled values.

Availability Zone Ids are not account specific, but Cloudformation does not yet support referencing by those.

@iph Interesting and makes sense.

I did some searching and found the explanation in the docs as well.

Thanks @iph for that jam! Im sure this issue, although closed will develop a life of it's own in the internet :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abelmokadem picture abelmokadem  路  3Comments

eladb picture eladb  路  3Comments

peterdeme picture peterdeme  路  3Comments

eladb picture eladb  路  3Comments

kawamoto picture kawamoto  路  3Comments