From 73e5fec36cb149cf666320afbe63308c968c62dd Mon Sep 17 00:00:00 2001 From: Otavio Macedo Date: Tue, 14 Dec 2021 20:39:31 +0000 Subject: [PATCH] fix(appsync): `ttl` property of `CachingConfig` is not required (#17981) According to the current CloudFormaton spec for [AWS::AppSync::Resolver CachingConfig][1], the `Ttl` property is not required. But if it's not provided, the deploy will fail with the message: > TTL value cannot be smaller than 1 second and larger than 3600 seconds. (Service: AWSAppSync; Status Code: 400; Error Code: BadRequestException The AppSync team has confirmed that the property is indeed required and they will push a change to the spec. This change is proactively making the property required on the CDK. Fixes https://github.com/aws/aws-cdk/issues/17925. BREAKING CHANGE: The `CachingConfig#ttl` property is now required. [1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-resolver-cachingconfig.html#cfn-appsync-resolver-cachingconfig-ttl ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-appsync/lib/caching-config.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/lib/caching-config.ts b/packages/@aws-cdk/aws-appsync/lib/caching-config.ts index bd189e41ee321..d02a393cc53c0 100644 --- a/packages/@aws-cdk/aws-appsync/lib/caching-config.ts +++ b/packages/@aws-cdk/aws-appsync/lib/caching-config.ts @@ -16,7 +16,6 @@ export interface CachingConfig { * The TTL in seconds for a resolver that has caching enabled. * Valid values are between 1 and 3600 seconds. * - * @default - No TTL */ - readonly ttl?: Duration; + readonly ttl: Duration; }