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-kinesis] Unable to use CfnParameter valueAsNumber in Kinesis Stream #9038

Closed
dscpinheiro opened this issue Jul 13, 2020 · 1 comment · Fixed by #9176
Closed

[aws-kinesis] Unable to use CfnParameter valueAsNumber in Kinesis Stream #9038

dscpinheiro opened this issue Jul 13, 2020 · 1 comment · Fixed by #9176
Assignees
Labels
@aws-cdk/aws-kinesis Related to Amazon Kinesis bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1

Comments

@dscpinheiro
Copy link
Contributor

I'm running into a problem similar to this one: #7126

Reproduction Steps

import * as cdk from '@aws-cdk/core';
import * as kinesis from '@aws-cdk/aws-kinesis';

export class KinesisTestStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    const shardCount = new cdk.CfnParameter(this, 'ShardCount', {
      type: 'Number',
      default: 2,
      minValue: 1,
      maxValue: 200
    });

    const dataRetention = new cdk.CfnParameter(this, 'RetentionHours', {
      type: 'Number',
      default: 24,
      minValue: 24,
      maxValue: 168
    });

    new kinesis.Stream(this, 'TestStream', {
      shardCount: shardCount.valueAsNumber,
      retentionPeriod: cdk.Duration.hours(dataRetention.valueAsNumber)
    });
  }
}

Error Log

retentionPeriod must be between 24 and 168 hours. Received -1.8881545897087524e+289

Environment

  • CLI Version : 1.51.0
  • Framework Version: 1.51.0
  • Node.js Version: v12.18.1
  • OS : macOS Mojave 10.14.6
  • Language (Version): TypeScript (3.7.2)

Other

Similar issue in SQS: #7126
Another possible related issue: #3448


This is 🐛 Bug Report

@dscpinheiro dscpinheiro added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 13, 2020
@github-actions github-actions bot added the @aws-cdk/aws-kinesis Related to Amazon Kinesis label Jul 13, 2020
@shivlaks
Copy link
Contributor

@dscpinheiro - As you've linked to the similar issue, it will likely need a similar fix (to make validation token aware) and skip it if it contains an unresolved token

@iliapolo iliapolo added effort/small Small work item – less than a day of effort p1 and removed needs-triage This issue or PR still needs to be triaged. labels Jul 16, 2020
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Jul 21, 2020
@mergify mergify bot closed this as completed in #9176 Jul 21, 2020
mergify bot pushed a commit that referenced this issue Jul 21, 2020
…entionPeriod (#9176)

Validation that was being performed was not taking into account that tokens could be provided for retentionPeriod

Fixes #9038

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Chriscbr pushed a commit to Chriscbr/aws-cdk that referenced this issue Jul 23, 2020
…entionPeriod (aws#9176)

Validation that was being performed was not taking into account that tokens could be provided for retentionPeriod

Fixes aws#9038

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
curtiseppel pushed a commit to curtiseppel/aws-cdk that referenced this issue Aug 11, 2020
…entionPeriod (aws#9176)

Validation that was being performed was not taking into account that tokens could be provided for retentionPeriod

Fixes aws#9038

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-kinesis Related to Amazon Kinesis bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants