Closed jitinrathi910949 closed 1 month ago
Hey @jitinrathi910949, thank you for reaching out. Could you run npx ampx info
and provide us the output?
Additionally, could you verify if the aws-cdk
and aws-cdk-lib
are currently installed in the project?
Hey @jitinrathi910949, thank you for reaching out. Could you run
npx ampx info
and provide us the output? Additionally, could you verify if theaws-cdk
andaws-cdk-lib
are currently installed in the project?
Hi @ykethan , Yes I have both the packages installed.
Here is the output for npx ampx info
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M1
Memory: 140.33 MB / 8.00 GB
Shell: /bin/bash
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
Yarn: 3.6.4 - ~/.yarn/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
pnpm: undefined - undefined
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.0
aws-cdk: 2.159.1
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
Hey @jitinrathi910949, thank you for the information. Could you try removing the local node_modules
and package-lock.json
and reinstall them with latest versions of Amplify backend packages.
"@aws-amplify/backend": "^1.3.0",
"@aws-amplify/backend-cli": "^1.2.8",
@ykethan @jitinrathi910949 I was also experiencing this issue after updating my @aws-amplify/backend
to 1.2.2 a couple of weeks ago. After following @ykethan's package upgrade and removing node-modules
looks like it finally deployed successfully, so that fixed my problem.
@ChristopherGabba thank you for the confirmation, closing the issue do reach out if you are still experiencing this.
I created a lambda function using gen2 as follow:
amplify/functions/send-link-file/resource.ts file:
hander.ts file:
backend.ts file:
Everything works well in sandbox. But while deployment, I am getting following error:
Expected behavior As it works well in the sandbox. This should deploy correctly.
Screenshots
Desktop (please complete the following information):
Browser Chrome
How can I solve this issue?