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

[Gen2]Add a no-minify option to defineFunction #2027

Open
antennix opened this issue Sep 18, 2024 · 1 comment
Open

[Gen2]Add a no-minify option to defineFunction #2027

antennix opened this issue Sep 18, 2024 · 1 comment
Labels
feature-request New feature or request function Issue pertaining to Amplify Function p3

Comments

@antennix
Copy link

Environment information

System:
  OS: macOS 14.5
  CPU: (8) x64 Apple M2
  Memory: 18.87 MB / 16.00 GB
  Shell: Unknown
Binaries:
  Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node
  Yarn: undefined - undefined
  npm: 10.8.2 - ~/.nvm/versions/node/v18.18.0/bin/npm
  pnpm: 8.15.4 - ~/.nvm/versions/node/v18.18.0/bin/pnpm
NPM Packages:
  @aws-amplify/auth-construct: 1.3.0
  @aws-amplify/backend: 1.2.1
  @aws-amplify/backend-auth: 1.1.4
  @aws-amplify/backend-cli: 1.2.6
  @aws-amplify/backend-data: 1.1.3
  @aws-amplify/backend-deployer: 1.1.2
  @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.6
  @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.2
  aws-amplify: 6.6.1
  aws-cdk: 2.158.0
  aws-cdk-lib: 2.158.0
  typescript: 5.6.2
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 feature

When using defineFunction in Amplify Gen2,
TypeScript code is transpiled and minified, making it difficult to directly modify the Lambda function when opening it in the management console.

There may be times when we want to make small additions to the code for debugging or verifying functionality.
I would like an option to be added to defineFunction that prevents minification.

Use case

export const function = defineFunction({
  name: 'function-name',
  entry: './handler.ts',
  runtime: 20,
  timeoutSeconds: 900,
  environment :{
    TABLE_NAME: 'xxx',
  },
  schedule: "0 0 ? * 1",  
  minify: false,    << like this
});
@antennix antennix added the pending-triage Incoming issues that need categorization label Sep 18, 2024
@ykethan
Copy link
Member

ykethan commented Sep 19, 2024

Hey @antennix, thank you for filing this, marking this as feature request.

note:

@ykethan ykethan added feature-request New feature or request function Issue pertaining to Amplify Function and removed pending-triage Incoming issues that need categorization labels Sep 19, 2024
@josefaidt josefaidt added the p3 label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request function Issue pertaining to Amplify Function p3
Projects
None yet
Development

No branches or pull requests

3 participants