You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If applicable, what version of Node.js are you using?
18
Amplify CLI Version
12.11.2
What operating system are you using?
MacOS Sonoma
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made.
Describe the bug
The amplify.state file contains a configurable option for custom lambda "build" commands.
I have a setup in an npm monorepo where:
My functions are monorepo "packages"
I have other shared "packages" that are dependencies of the functions (e.g. a database utility used by some functions)
I need to make sure that when I install these packages during amplify build, they're embedded in node_modules as is and not installed as symlinks.
To make the final step work, I have a custom "build" command in my amplify.state file. With the build command npm install --workspaces=false --install-links --no-bin-links --production I ensure that my database utils monorepo package is copied to the node_modules folder in my lambdas when I run amplify deploy.
Expected behavior
Because I needed to customise the lambda build command, I needed to get into the amplify.state file. I think this file shouldn't be hidden in the IDE anymore to ensure users can easily access it (as it stands, I'm removing it from being hidden in my IDE settings .vscode/settings.json).
Users should probably be able to customise this command when running function update.
The customised command could be stored in backend-config.json too, and updated in the amplify.state when building for deployment.
Reproduction steps
Amplify init a project
select vscode as IDE
check .vscode/settings.json to see the config of the file being hidden: "amplify/**/amplify.state": true,
Project Identifier
9f0ac5b025abe4eeaef38d0a8f34c06f
Log output
# Put your logs below this line
Additional information
(Aside; I also have a problem where amplify can't detect changes in a symlinked hoisted dependency of my functions when I run amplify deploy, so I have a custom pre-deploy command where I write a checksum to a file in each of the functions that depend on these monorepo packages. This checksum is generated by hashing the files tracked in git of the symlinked dependency)
Before submitting, please confirm:
I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
I have removed any sensitive information from my code snippets and submission.
The text was updated successfully, but these errors were encountered:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
18
Amplify CLI Version
12.11.2
What operating system are you using?
MacOS Sonoma
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made.
Describe the bug
The amplify.state file contains a configurable option for custom lambda "build" commands.
I have a setup in an npm monorepo where:
To make the final step work, I have a custom "build" command in my
amplify.state
file. With the build commandnpm install --workspaces=false --install-links --no-bin-links --production
I ensure that my database utils monorepo package is copied to the node_modules folder in my lambdas when I runamplify deploy
.Expected behavior
Because I needed to customise the lambda
build
command, I needed to get into theamplify.state
file. I think this file shouldn't be hidden in the IDE anymore to ensure users can easily access it (as it stands, I'm removing it from being hidden in my IDE settings.vscode/settings.json
).Users should probably be able to customise this command when running
function update
.The customised command could be stored in backend-config.json too, and updated in the
amplify.state
when building for deployment.Reproduction steps
.vscode/settings.json
to see the config of the file being hidden:"amplify/**/amplify.state": true,
Project Identifier
9f0ac5b025abe4eeaef38d0a8f34c06f
Log output
Additional information
(Aside; I also have a problem where amplify can't detect changes in a symlinked hoisted dependency of my functions when I run
amplify deploy
, so I have a custom pre-deploy command where I write a checksum to a file in each of the functions that depend on these monorepo packages. This checksum is generated by hashing the files tracked in git of the symlinked dependency)Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: