Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-kinesisfirehose-alpha: Needs support for eu-central-2 #27518

Closed
jstoneham opened this issue Oct 12, 2023 · 8 comments
Closed

aws-kinesisfirehose-alpha: Needs support for eu-central-2 #27518

jstoneham opened this issue Oct 12, 2023 · 8 comments
Labels
@aws-cdk/aws-kinesisfirehose Related to Amazon Kinesis Data Firehose bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@jstoneham
Copy link

Describe the bug

Creating a DeliveryStream in eu-central-2 fails at synth time with Error: Mapping doesn't contain top-level key 'eu-central-2'.

Expected Behavior

Configured constructs in a stack set to deploy to eu-central-2 using aws-cdk-lib 2.99.0 and @aws-cdk/aws-kinesisfirehose-alpha 2.99.0-alpha. Expected a clean compile.

Current Behavior

Error: Mapping doesn't contain top-level key 'eu-central-2'
    at CfnMapping.findInMap (/workspace/jgstone/Temp/src/MyPackage/node_modules/aws-cdk-lib/core/lib/cfn-mapping.js:1:1419)
    at setConnections (/workspace/jgstone/Temp/src/MyPackage/node_modules/@aws-cdk/aws-kinesisfirehose-alpha/lib/delivery-stream.ts:407:32)
    at new DeliveryStreamBase (/workspace/jgstone/Temp/src/MyPackage/node_modules/@aws-cdk/aws-kinesisfirehose-alpha/lib/delivery-stream.ts:108:24)
    at new DeliveryStream (/workspace/jgstone/Temp/src/MyPackage/node_modules/@aws-cdk/aws-kinesisfirehose-alpha/lib/delivery-stream.ts:317:5)
    at /workspace/jgstone/Temp/src/MyPackage/lib/stacks/kinesis-receiver.ts:108:30
    at Array.map (<anonymous>)
    at new KinesisReceiverStack (/workspace/jgstone/Temp/src/MyPackage/lib/stacks/kinesis-receiver.ts:34:50)
    at StackGenerator.buildStacks (/workspace/jgstone/Temp/src/MyPackage/lib/stack-generator.ts:28:34)
    at /workspace/jgstone/Temp/src/MyPackage/lib/app.ts:22:25
    at /workspace/jgstone/Temp/src/MyPackage/lib/deployment-pipeline.ts:191:55

Reproduction Steps

Just take any normal code example of DeliveryStream like your unit tests and synth it in eu-central-2.

Possible Solution

aws-kinesisfirehose-alpha uses a mapping of CIDR blocks (https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/region-info/build-tools/fact-tables.ts#L768) per region. This list is incomplete (it does not include eu-central-2), so using these constructs in this region is not functional. (It also is missing ap-south-2, eu-south-2, as well as any announced/upcoming build regions like Calgary).

Additional Information/Context

No response

CDK CLI Version

2.93.0

Framework Version

No response

Node.js Version

v18.18.0

OS

Amazon Linux 2

Language

TypeScript

Language Version

TypeScript (4.9.4)

Other information

Please add these regions, but I would also suggest we find a way to have these constructs work /without/ this configuration, to fill it in automatically at build time from some source, or to have regions included automatically closer to launch. The requirement to file an issue to get any region included here means the Firehose constructs will never work pre-region launch (which is a problem for Amazon builders), nor directly after region launch (which is a difficulty for all CDK users likely to extend their pipeline to all new regions).

@jstoneham jstoneham added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 12, 2023
@github-actions github-actions bot added the @aws-cdk/aws-kinesisfirehose Related to Amazon Kinesis Data Firehose label Oct 12, 2023
@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. p2 effort/small Small work item – less than a day of effort needs-review and removed needs-triage This issue or PR still needs to be triaged. investigating This issue is being investigated and/or work is in progress to resolve the issue. needs-review labels Oct 12, 2023
@msambol
Copy link
Contributor

msambol commented Oct 22, 2023

@mrgrain The metadata resource is not deployed yet in eu-central-2, correct? I don't believe CDK can support this until then.

@mrgrain
Copy link
Contributor

mrgrain commented Oct 22, 2023

@msambol This has nothing todo with the metadata resource. Just need to check this doc page and update the table.
(Should be 16.62.183.32/27 for Europe (Zurich))

@mrgrain
Copy link
Contributor

mrgrain commented Oct 22, 2023

@jstoneham You should be able to supply these facts yourself. Documentation

regionInfo.Fact.register({ region: "eu-central-2", name: "FIREHOSE_CIDR_BLOCK", value: "16.62.183.32/27" });

Please add these regions, but I would also suggest we find a way to have these constructs work /without/ this configuration, to fill it in automatically at build time from some source, or to have regions included automatically closer to launch. The requirement to file an issue to get any region included here means the Firehose constructs will never work pre-region launch (which is a problem for Amazon builders), nor directly after region launch (which is a difficulty for all CDK users likely to extend their pipeline to all new regions).

If you are internal, feel free to reach out to me to discuss options.

@msambol
Copy link
Contributor

msambol commented Oct 23, 2023

@mrgrain related: there is an issue with the register code that I addressed here: #27506

@msambol
Copy link
Contributor

msambol commented Oct 25, 2023

@jstoneham I think we can close this in favor of #27656?

@jstoneham
Copy link
Author

Sure, if you like. Didn't mean to double-file - when I filed this one I thought it hadn't been added yet. Then I upgraded all my stuff and one of my pipelines failed and I realized some had been removed instead! So I thought I'd file another issue. Didn't twig that the regions overlapped.

@SankyRed
Copy link
Contributor

Can close this issue as part of the fix for this issue #27656

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-kinesisfirehose Related to Amazon Kinesis Data Firehose bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants