Repository navigation
fix(cli): filter benign time-relative AppSync ApiKey /Expires drift - #14991
Merged
Merged
Conversation
AppSync ApiKey /Expires is set to createTime+validity at deploy and re-derived later at lock time, so the two epoch timestamps legitimately differ. Drop it as a false positive, guarded so it only ever drops epoch-like values (both parse as epoch > ~2020) and cannot mask a non-timestamp mutation.
sarayev
marked this pull request as ready for review
September 30, 2026 05:54
soberm
approved these changes
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a false-positive filter for AppSync ApiKey
/Expiresdrift during Gen2 migration drift detection.An AppSync ApiKey
Expiresvalue is set tocreateTime + validityat deploy time, and then re-derived at a later lock time when drift is computed. Because the two epoch timestamps are computed at different moments, they legitimately differ, so CloudFormation reports a drift that is not a real configuration change. A real observed pair from the migration e2e runs was Expected1791274802vs Deployed1.7912736E+9(a benign delta of roughly 20 minutes; note the deployed value also comes back in scientific notation).The new
isAppSyncApiKeyExpiresTimeRelativeDriftfilter drops this specific case. It is guarded so it only ever fires onAWS::AppSync::ApiKeyresources, only on the/Expiresproperty path, and only when both the expected and actual values parse as epoch-like numbers (finite and greater than roughly the year 2020). Those guards mean the filter cannot mask a non-timestamp mutation or any change to a different property.Why this is not a source regression
The drift-detection code is unchanged between July and now. This surfaced because CloudFormation's drift output began reporting the time-relative
/Expiresdifference, not because any code changed.Impact
Clears the 7
gen2_migratione2e groups that were failing on/Expiresdrift.Testing
packages/amplify-clidrift unit tests pass 12/12, including four new cases covering the real CI pair, a plain-integer epoch pair, non-epoch and non-numeric values (not filtered), and wrong resource type / wrong property path (not filtered).