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

Circular dependancy Issues #1850

Open
ykethan opened this issue Aug 12, 2024 · 1 comment
Open

Circular dependancy Issues #1850

ykethan opened this issue Aug 12, 2024 · 1 comment
Labels
bug Something isn't working dependency Issue related to upstream dependency

Comments

@ykethan
Copy link
Member

ykethan commented Aug 12, 2024

Environment information

System:
  OS: macOS 14.6
  CPU: (8) arm64 Apple M1
  Memory: 282.03 MB / 16.00 GB
  Shell: /opt/homebrew/bin/fish
Binaries:
  Node: 20.2.0 - ~/.nvm/versions/node/v20.2.0/bin/node
  Yarn: 1.22.19 - ~/.nvm/versions/node/v20.2.0/bin/yarn
  npm: 10.8.2 - ~/Documents/ampapps/backenddevtest/amplify-next-pages-template/node_modules/.bin/npm
  pnpm: 8.13.1 - ~/.nvm/versions/node/v20.2.0/bin/pnpm
NPM Packages:
  @aws-amplify/auth-construct: Not Found
  @aws-amplify/backend: 1.0.4
  @aws-amplify/backend-auth: Not Found
  @aws-amplify/backend-cli: 1.2.2
  @aws-amplify/backend-data: Not Found
  @aws-amplify/backend-deployer: Not Found
  @aws-amplify/backend-function: Not Found
  @aws-amplify/backend-output-schemas: Not Found
  @aws-amplify/backend-output-storage: Not Found
  @aws-amplify/backend-secret: Not Found
  @aws-amplify/backend-storage: Not Found
  @aws-amplify/cli-core: Not Found
  @aws-amplify/client-config: Not Found
  @aws-amplify/deployed-backend-client: Not Found
  @aws-amplify/form-generator: Not Found
  @aws-amplify/model-generator: Not Found
  @aws-amplify/platform-core: Not Found
  @aws-amplify/plugin-types: Not Found
  @aws-amplify/sandbox: Not Found
  @aws-amplify/schema-generator: Not Found
  aws-amplify: 6.4.3
  aws-cdk: 2.150.0
  aws-cdk-lib: 2.150.0
  typescript: 5.5.4
AWS environment variables:
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Description

Issue tracking CloudFormation circular dependancy behavior

Current issue noting circular dependancy:

#1552
aws-amplify/amplify-category-api#2554
#1723
#1740
#1715
#1659
#1658
#1699
#1594
#1459
#1375
#1803

@ykethan ykethan added pending-triage Incoming issues that need categorization bug Something isn't working dependency Issue related to upstream dependency and removed pending-triage Incoming issues that need categorization labels Aug 12, 2024
@ykethan ykethan added the p2 label Aug 13, 2024
@ykethan ykethan removed the p2 label Aug 27, 2024
@juniarz
Copy link

juniarz commented Aug 31, 2024

I recently worked on the Gen 2 project and encountered above mentioned challenges. In my experimental project, I aimed to implement the following components:

  • Custom lambda authentication for data (using Cognito's JWKS to identify logged-in users, where the access token is a Cognito ID token wrapped in a custom format).
  • Overrides for some data create/update/delete mutations.
  • DynamoDB Stream handler.
  • An SQS to process messages.

In Gen 2, the root stack contains "auth," "data," and "function," which leads to circular dependency issues. To address this, I set up the local environment and ensured that each function is created in its own stack. This approach seems to be working well so far, but I am unsure if there are any other potential consequences that have not been addressed by this change.

image

Is this the right place to discuss this?

Edit 1: I also noticed that with this change, I was able to make use of the helper functions like "grantStreamRead", "grantSendMessages", "addEventSource"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependency Issue related to upstream dependency
Projects
None yet
Development

No branches or pull requests

2 participants