amplify-backend icon indicating copy to clipboard operation
amplify-backend copied to clipboard

Support for Lambda mock locally

Open ykethan opened this issue 1 year ago • 5 comments

Environment information

System:
  OS: macOS 14.5
  CPU: (8) arm64 Apple M1
  Memory: 168.66 MB / 16.00 GB
  Shell: /opt/homebrew/bin/fish
Binaries:
  Node: 20.11.1 - ~/.local/share/nvm/v20.11.1/bin/node
  Yarn: 1.22.19 - ~/.local/share/nvm/v20.11.1/bin/yarn
  npm: 10.2.4 - ~/.local/share/nvm/v20.11.1/bin/npm
  pnpm: 8.15.4 - ~/Library/pnpm/pnpm
NPM Packages:
  @aws-amplify/backend: 1.0.2
  @aws-amplify/backend-cli: 1.0.3
  aws-amplify: 6.3.2
  aws-cdk: 2.141.0
  aws-cdk-lib: 2.141.0
  typescript: 5.4.5
AWS environment variables:
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Description

In Gen 1, Amplify CLI supported mocking Lambda functions. Similarly, mocking typescript functions would be great in Gen 2.

ykethan avatar May 28 '24 16:05 ykethan

It would be nice to have a way to invoke functions locally without the need for navigating to the Lambda Console, or wiring up behind Data

Marking as a feature request

josefaidt avatar May 28 '24 16:05 josefaidt

Hi, Any update on this?

Thank you!

Arnoldguti avatar Jul 26 '24 11:07 Arnoldguti

I really want this feature. Currently, my team deploys for every small change to test if it’s working. Is there a better way to test the amplify function locally?

suryaishnavi avatar Oct 22 '24 18:10 suryaishnavi

For now I am using a CDK project and create the bare bone Amplify functions(without Schema types) in there and debug them using SAM CLI. It is a messy solution but at least it saves too much time.

chaosity-io avatar Jan 13 '25 23:01 chaosity-io

+1

devapalanisamy avatar May 06 '25 18:05 devapalanisamy