Skip to content

(apigateway.RequestAuthorizer): (Removing Cache TTL does not reset to default value of 300s) #27826

@bpauwels

Description

@bpauwels

Describe the bug

If you create a custom authorizer and set resultsCacheTtl to any value other then 300s, then later remove the property, I would expect it to reset to the default of 300s. Instead, it remains at the latest set value.

Expected Behavior

TTL is reset to the default value of 300s

Current Behavior

TTL remains at the previously set value

Reproduction Steps

Reproduction Steps:

const authorizer = new RequestAuthorizer(this, "LambdaAuthorizer", {
      handler: authorizerHandler,
      resultsCacheTtl: cdk.Duration.seconds(301),
      identitySources: [
        IdentitySource.header("someheader"),
      ],
    });

Deploy this, then change it to

const authorizer = new RequestAuthorizer(this, "LambdaAuthorizer", {
      handler: authorizerHandler,
      identitySources: [
        IdentitySource.header("someheader"),
      ],
    });

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.96.2

Framework Version

No response

Node.js Version

16.19.1

OS

MacOS

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-apigatewayRelated to Amazon API GatewaybugThis issue is a bug.effort/mediumMedium work item – several days of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions