-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
We are trying to add SST-based projects to a large corporate monorepo, however the SST toolchain assumes it will always be invoked by a person with AWS credentials, and who can respond to STDIN prompts.
Repro steps
npx create-serverless-stack@latest my-sst-app -- --language typescriptcd my-sst-appnpm run build
Actual behavior (problem)
- The CLI prompts to read interactive input from STDIN:
Look like you’re running sst for the first time in this directory. Please enter a stage
name you’d like to use locally. Or hit enter to use the one based on your AWS
credentials (Owner):
- Then the CLI refuses to proceed without AWS credentials:
EnvironmentCredentialsProviderFailure: Variable AMAZON_ACCESS_KEY_ID not set.
Expected behavior
It's fine to require AWS credentials for operations that do deployments or communicate with Amazon's cloud. However a developer should be able to compile source files and run Jest tests without AWS credentials.
Also the npm run build action must not prompt for STDIN input, because it is invoked by monorepo commands that build many projects in parallel.
Background
At our company, the SST projects exist in a monorepo that is used by many other developers, many of whom don't have AWS credentials at all, because they work on other project types such as client apps. Those developers need to compile SST projects and run unit tests for validation, but they do not need to run services or deploy service projects. (In fact, today I am able to build/test all the projects in our monorepo in "airplane mode" without any internet at all.)
If we add SST projects to this workspace, the SST toolchain needs to distinguish compiling/testing (sst build and sst test let's say) from running/deploying (sst start, sst deploy). The toolchain should assume that every user is a Serverless Stack developer with AWS credentials set up.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status