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

cleanup generated env file on deploy #2212

Open
ykethan opened this issue Nov 8, 2024 · 1 comment
Open

cleanup generated env file on deploy #2212

ykethan opened this issue Nov 8, 2024 · 1 comment
Labels
bug Something isn't working sandbox Related to the sandbox experience

Comments

@ykethan
Copy link
Member

ykethan commented Nov 8, 2024

Environment information

System:
  OS: macOS 14.7.1
  CPU: (8) arm64 Apple M1
  Memory: 142.02 MB / 16.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 22.10.0 - /opt/homebrew/bin/node
  Yarn: 1.22.21 - ~/.nvm/versions/node/v20.2.0/bin/yarn
  npm: 10.9.0 - /opt/homebrew/bin/npm
  pnpm: 9.8.0 - /opt/homebrew/bin/pnpm
NPM Packages:
  @aws-amplify/auth-construct: 1.3.1
  @aws-amplify/backend: 1.5.1
  @aws-amplify/backend-auth: 1.2.0
  @aws-amplify/backend-cli: 1.2.9
  @aws-amplify/backend-data: 1.1.5
  @aws-amplify/backend-deployer: 1.1.5
  @aws-amplify/backend-function: 1.7.1
  @aws-amplify/backend-output-schemas: 1.4.0
  @aws-amplify/backend-output-storage: 1.1.2
  @aws-amplify/backend-secret: 1.1.4
  @aws-amplify/backend-storage: 1.2.1
  @aws-amplify/cli-core: 1.1.3
  @aws-amplify/client-config: 1.5.0
  @aws-amplify/deployed-backend-client: 1.4.1
  @aws-amplify/form-generator: 1.0.3
  @aws-amplify/model-generator: 1.0.8
  @aws-amplify/platform-core: 1.1.0
  @aws-amplify/plugin-types: 1.3.0
  @aws-amplify/sandbox: 1.2.3
  @aws-amplify/schema-generator: 1.2.4
  aws-amplify: 6.6.5
  aws-cdk: 2.162.1
  aws-cdk-lib: 2.162.1
  typescript: 5.6.3
AWS environment variables:
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Describe the bug

the env files generated for a lambda function in .amplify/generated/env are not cleaned up.
For example if the function was renamed or function was deleted. The env import or sandbox deploy will not throw any error as the file is not cleaned up. The deploy will fail on amplify hosting as the file will not generate.

Reproduction steps

  1. Add a Lambda function
  2. import env object in handler
  3. rename Lambda function
@ykethan ykethan added the pending-triage Incoming issues that need categorization label Nov 8, 2024
@ykethan
Copy link
Member Author

ykethan commented Nov 8, 2024

PR addressing this: #2054

@ykethan ykethan added bug Something isn't working sandbox Related to the sandbox experience and removed pending-triage Incoming issues that need categorization labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sandbox Related to the sandbox experience
Projects
None yet
Development

No branches or pull requests

1 participant