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

ability to group function with custom stack #2469

Closed
ykethan opened this issue Jan 30, 2025 · 1 comment
Closed

ability to group function with custom stack #2469

ykethan opened this issue Jan 30, 2025 · 1 comment
Labels
pending-triage Incoming issues that need categorization

Comments

@ykethan
Copy link
Member

ykethan commented Jan 30, 2025

Environment information

System:
  OS: macOS 15.2
  CPU: (8) arm64 Apple M1
  Memory: 251.27 MB / 16.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 20.18.1 - ~/.nvm/versions/node/v20.18.1/bin/node
  Yarn: 1.22.22 - /opt/homebrew/bin/yarn
  npm: 10.8.2 - ~/.nvm/versions/node/v20.18.1/bin/npm
  pnpm: 9.15.2 - ~/Library/pnpm/pnpm
NPM Packages:
  @aws-amplify/auth-construct: 1.6.0
  @aws-amplify/backend: 1.14.0
  @aws-amplify/backend-auth: 1.5.0
  @aws-amplify/backend-cli: 1.4.8
  @aws-amplify/backend-data: 1.4.0
  @aws-amplify/backend-deployer: 1.1.15
  @aws-amplify/backend-function: 1.12.1
  @aws-amplify/backend-output-schemas: 1.4.0
  @aws-amplify/backend-output-storage: 1.1.4
  @aws-amplify/backend-secret: 1.1.5
  @aws-amplify/backend-storage: 1.2.4
  @aws-amplify/cli-core: 1.2.3
  @aws-amplify/client-config: 1.5.5
  @aws-amplify/deployed-backend-client: 1.5.0
  @aws-amplify/form-generator: 1.0.3
  @aws-amplify/model-generator: 1.0.12
  @aws-amplify/platform-core: 1.6.0
  @aws-amplify/plugin-types: 1.8.0
  @aws-amplify/sandbox: 1.2.10
  @aws-amplify/schema-generator: 1.2.7
  aws-amplify: 6.12.1
  aws-cdk: 2.176.0
  aws-cdk-lib: 2.176.0
  typescript: 5.7.3
No AWS environment variables
No CDK environment variables

Describe the feature

When assigning to custom resourceGroupName on a function and backend.ts contains the following

// function
defineFunction({
  name: "apifunction",
  entry: "./handler.ts",
  resourceGroupName: "api-stack",
});

// backend.ts
const apiStack = backend.createStack("api-stack");

this will throw Custom stack named api-stack has already been created

would be great if a custom stack is present the function does not create a new stack rather append to the existing stack

Use case

Would provide the ability to group lambda functions that interact with custom resources

@ykethan ykethan added the pending-triage Incoming issues that need categorization label Jan 30, 2025
@ykethan
Copy link
Member Author

ykethan commented Jan 31, 2025

closing this issue as we can pass custom resourceGroupName on the function and add the custom api resources to this stack
using backend.apiFunction.stack

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-triage Incoming issues that need categorization
Projects
None yet
Development

No branches or pull requests

1 participant