Skip to content
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

fix: disable waiter state machine logging that results in deploy error #2196

Closed
wants to merge 14 commits into from

Conversation

dpilch
Copy link
Member

@dpilch dpilch commented Jan 12, 2024

Description of changes

Attempting to deploy in later versions of CDK result in error:

Failed resources:
495
amplify-d1uihw3hsv57pt-testBranch28a2f7a214-amplifyDataAmplifyTableManagerNestedStackA-1A5VX34IFEO0P | 12:36:39 AM | CREATE_FAILED        | AWS::StepFunctions::StateMachine    | data/amplifyData/AmplifyTableManager/TableManagerCustomProvider/waiter-state-machine (TableManagerCustomProviderwaiterstatemachine46E6141A) Resource handler returned message: "Invalid Logging Configuration: The CloudWatch Logs Resource Policy size was exceeded. We suggest prefixing your CloudWatch log group name with /aws/vendedlogs/states/. (Service: AWSStepFunctions; Status Code: 400; Error Code: InvalidLoggingConfiguration; Request ID: 562033e5-4c8c-4bbc-a20a-9f6c23a0e330; Proxy: null)" (RequestToken: 1c14bad9-451d-26c2-3555-f4a444b72316, HandlerErrorCode: InvalidRequest)

This change upgrades our dependencies to the latest CDK Lib version so that we can utilize an option to disable logging on the state machine.

See https://github.com/aws-amplify/amplify-category-api/pull/2196/files#diff-2f1007f7f1c64b1c31c5f33e3efef71fa74eb48019015e14154109e08faae65e.

CDK / CloudFormation Parameters Changed

Upgrade to CDK version ^2.120.0.

Issue #, if available

N/A

Description of how you validated changes

  • Add unit test to ensure logging configuration is not set.
  • manually verify with steps:
    • yarn create amplify
    • npx amplify deploy ...

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dpilch dpilch changed the title chore: upgrade to aws-cdk-lib@2.120.0 fix: disable waiter state machine logging that results in deploy error Jan 12, 2024
@dpilch dpilch marked this pull request as ready for review January 12, 2024 20:56
@dpilch dpilch requested review from a team as code owners January 12, 2024 20:56
@@ -25,7 +25,7 @@ describe('v1 to v2 migration', () => {
const v1nestedStackNames = Object.keys(v1result.stacks).filter((stackName) => stackName !== 'ConnectionStack'); // The v1 transformer puts all connection resolvers in a 'ConnectionStack'. This stack does not define any data resources

// verify root stack diff
const diff = cdkDiff.diffTemplate(v1result.rootStack, v2result.rootStack);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking change with version upgrade: aws/aws-cdk#28336

diffTemplate is no longer exported, but fullDiff seems to just be a wrapper.

@dpilch
Copy link
Member Author

dpilch commented Jan 12, 2024

The version upgrade will also require moving to Jest 27: jestjs/jest#11331

sundersc
sundersc previously approved these changes Jan 12, 2024
phani-srikar
phani-srikar previously approved these changes Jan 12, 2024
@dpilch dpilch dismissed stale reviews from phani-srikar and sundersc via 0105ccc January 12, 2024 22:32
AaronZyLee
AaronZyLee previously approved these changes Jan 13, 2024
sundersc
sundersc previously approved these changes Jan 13, 2024
phani-srikar
phani-srikar previously approved these changes Jan 13, 2024
@dpilch dpilch dismissed stale reviews from phani-srikar and sundersc via 6939f91 January 13, 2024 00:25
phani-srikar
phani-srikar previously approved these changes Jan 13, 2024
sundersc
sundersc previously approved these changes Jan 13, 2024
svidgen
svidgen previously approved these changes Jan 13, 2024
@dpilch dpilch dismissed stale reviews from svidgen, sundersc, and phani-srikar via c84d01b January 13, 2024 00:43
svidgen
svidgen previously approved these changes Jan 13, 2024
phani-srikar
phani-srikar previously approved these changes Jan 13, 2024
@palpatim palpatim dismissed stale reviews from phani-srikar and svidgen via 2ff01b1 January 16, 2024 18:31
@dpilch dpilch closed this Jan 17, 2024
@palpatim palpatim deleted the fix-log-size branch March 6, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants