question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(appsync): 2.1.0 breaks deployment

See original GitHub issue

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 Properties CachingKeys & Ttl as optional, our tests show that when CachingConfig is set, Ttl must be as well.

Current state of v2.1.0: Not specifying any cachingConfig fails. Specifying a cachingConfig including only cachingKeys fails. Specifying a cachingConfig including only ttl succeeds. Specifying a cachingConfig with both cachingKeys and ttl succeeds.

So it seems like ttl cannot be optional, and we need to check if cachingConfig 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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kylevillegas93commented, Dec 13, 2021

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.

0reactions
manumakicommented, Dec 16, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting and Common Mistakes - AWS AppSync
This section discusses some common errors and how to troubleshoot them. Incorrect DynamoDB Key Mapping. If your GraphQL operation returns the following ...
Read more >
AWS Appsync and GraphQL - HMH Engineering
AWS AppSync at its core uses a single data graph Schema, ... AppSync will not be able to see private APIs (deployed within...
Read more >
Offline GraphQL Apps with AWS AppSync - YouTube
Modern developers need easy tools for offline access and synchronization. These techniques are no longer optional for great user experiences ...
Read more >
v1.8 to v2.0 - Argo CD - Declarative GitOps CD for Kubernetes
It means that you need to update argocd-dex-server deployment's commands to ... App Sync command exposes certain retry options, which allows the users...
Read more >
aws-amplify | Yarn - Package Manager
GraphQL API · AWS AppSync, Interact with your GraphQL or AWS AppSync endpoint(s). ... x.x has breaking changes. ... 2.1.0 (2019-11-15). Features.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found