-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(appsync): 2.1.0 breaks deployment #17925
Comments
Can confirm the same experience. I removed the |
The PR linked above makes The CloudFormation team has been notified about the mismatch in the specification. |
If the `cachingConfig` property is not provided, the library is generating an empty config. Change this to not add any config to the template. Related to #17925. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Ah, so the |
@seanWLawrence |
What is the workaround for this? |
My bad - happy to help if there are any other changes that need to be made but looks like they are all covered - just lemme know. @bodokaiser - you many want to use an older CDK version < 2.1.0 until the next release has both of the above changes. |
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 #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*
|
2.2.0 has same issue |
We just deployed successfully after upgrading from 2.0.0 to 2.2.0. |
OK our stack doesn't actually use Appsync. I'll try to figure out what's the problem and create separate issue :) We get the same error though. |
…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 aws#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*
What is the problem?
After upgrading from 2.0.0 to 2.1.0 we are no longer able to deploy, receiving:
TTL value cannot be smaller than 1 second and larger than 3600 seconds. (Service: AWSAppSync; Status Code: 400; Error Code: BadRequestException
This seems to be caused by #17815, that introduces cachingConfig to appsync resolvers.
Despite the Cloudformation documentation specifying both the
CachingConfig
and its two PropertiesCachingKeys
&Ttl
as optional, our tests show that whenCachingConfig
is set,Ttl
must be as well.Current state of v2.1.0:
Not specifying any
cachingConfig
fails.Specifying a
cachingConfig
including onlycachingKeys
fails.Specifying a
cachingConfig
including onlyttl
succeeds.Specifying a
cachingConfig
with bothcachingKeys
andttl
succeeds.So it seems like
ttl
cannot be optional, and we need to check ifcachingConfig
is passed before adding it to the cfnResolver at line 117 in resolver.ts@kylevillegas93 Are you able to look into this? I'm happy to help, but also quite busy until next year, and it would be nice to have a fix before then.
Reproduction Steps
Deploy a stack with any appsync resolver, without specifying
cachingConfig
.What did you expect to happen?
Deployment to succeed without any errors.
What actually happened?
Deployment fails with:
TTL value cannot be smaller than 1 second and larger than 3600 seconds. (Service: AWSAppSync; Status Code: 400; Error Code: BadRequestException
CDK CLI Version
2.1.0
Framework Version
2.1.0
Node.js Version
14.18.2
OS
macOS 11.6.1
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: