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

Deployment failed: Error [ValidationError]: Circular dependency between resources #1977

Closed
silentlie opened this issue Sep 10, 2024 · 1 comment
Labels
function Issue pertaining to Amplify Function pending-response Issue is pending response from author pending-triage Incoming issues that need categorization

Comments

@silentlie
Copy link

Environment information

System:
  OS: Windows 10 10.0.19045
  CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
  Memory: 2.19 GB / 15.92 GB
Binaries:
  Node: 22.0.0 - C:\Program Files\nodejs\node.EXE       
  Yarn: undefined - undefined
  npm: 10.8.0 - C:\Program Files\nodejs\npm.CMD
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/auth-construct: 1.3.0
  @aws-amplify/backend: 1.2.1
  @aws-amplify/backend-auth: 1.1.3
  @aws-amplify/backend-cli: 1.2.5
  @aws-amplify/backend-data: 1.1.3
  @aws-amplify/backend-deployer: 1.1.0
  @aws-amplify/backend-function: 1.4.0
  @aws-amplify/backend-output-schemas: 1.2.0
  @aws-amplify/backend-output-storage: 1.1.1
  @aws-amplify/backend-secret: 1.1.1
  @aws-amplify/backend-storage: 1.1.2
  @aws-amplify/cli-core: 1.1.2
  @aws-amplify/client-config: 1.3.0
  @aws-amplify/deployed-backend-client: 1.4.0
  @aws-amplify/form-generator: 1.0.1
  @aws-amplify/model-generator: 1.0.5
  @aws-amplify/platform-core: 1.1.0
  @aws-amplify/plugin-types: 1.2.1
  @aws-amplify/sandbox: 1.2.1
  @aws-amplify/schema-generator: 1.2.1
  aws-amplify: 6.6.0
  aws-cdk: 2.156.0
  aws-cdk-lib: 2.156.0
  typescript: 5.5.4
AWS environment variables:
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
  AWS_STS_REGIONAL_ENDPOINTS = regional
No CDK environment variables

Describe the bug

I encountered an issue when trying to perform a hotswap deployment using AWS Amplify. The deployment fails with a circular dependency error between resources when using a Lambda trigger on DynamoDB Streams along with other Lambda functions. The issue causes the deployment to fall back to a full deployment, which eventually fails.

Reproduction steps

  1. Create amplify with npm create amplify@latest
  2. Follow tutorial on Set up a Function
  3. Follow tutorial on DynamoDB Streams
@silentlie silentlie added the pending-triage Incoming issues that need categorization label Sep 10, 2024
@ykethan
Copy link
Member

ykethan commented Sep 10, 2024

Hey, thank you for reaching out. The issue appear to be similar to #1552, #1723.

Refer to the comments providing examples in creating a Lambda event source that mitigates the issue.
#1552 (comment)
#1723 (comment)

Issue currently tracking circular dependency: #1850

@ykethan ykethan added pending-response Issue is pending response from author function Issue pertaining to Amplify Function labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
function Issue pertaining to Amplify Function pending-response Issue is pending response from author pending-triage Incoming issues that need categorization
Projects
None yet
Development

No branches or pull requests

2 participants