sst / sst Goto Github PK
View Code? Open in Web Editor NEWBuild modern full-stack applications on AWS
Home Page: https://sst.dev
License: MIT License
Build modern full-stack applications on AWS
Home Page: https://sst.dev
License: MIT License
$ sst deploy
Preparing your SST app
Transpiling source
Linting source
Deploying stacks
functionArn: arn:aws:lambda:us-east-1:${Token[AWS.AccountId.0]}:function:mysstapp-app-dev-notify.
dev-mysstapp-infra-dynamodb: deploying...
❌ dev-mysstapp-infra-dynamodb failed: Error: Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment
at SdkProvider.resolveEnvironment (/Users/me/workspace/mysstapp/serverless-infra/node_modules/sst-cdk/lib/api/aws-auth/sdk-provider.ts:208:13)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at CloudFormationDeployments.prepareSdkFor (/Users/me/workspace/mysstapp/serverless-infra/node_modules/sst-cdk/lib/api/cloudformation-deployments.ts:236:33)
at CloudFormationDeployments.deployStack (/Users/me/workspace/mysstapp/serverless-infra/node_modules/sst-cdk/lib/api/cloudformation-deployments.ts:162:70)
at CdkToolkit.deploy (/Users/me/workspace/mysstapp/serverless-infra/node_modules/sst-cdk/lib/cdk-toolkit.ts:194:24)
at Object.deployAsync (/Users/me/workspace/mysstapp/serverless-infra/node_modules/sst-cdk/lib/serverless-stack.ts:122:15)
at /Users/me/workspace/mysstapp/serverless-infra/node_modules/@serverless-stack/core/index.js:71:17
at async Promise.all (index 0)
at deployStacks (/Users/me/workspace/mysstapp/serverless-infra/node_modules/@serverless-stack/core/index.js:48:5)
at Object.parallelDeploy (/Users/me/workspace/mysstapp/serverless-infra/node_modules/@serverless-stack/core/index.js:446:3)
❌ dev-mysstapp-infra-dynamodb failed: Error: Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment
dev-mysstapp-infra-eventbridge: deploying...
❌ dev-mysstapp-infra-eventbridge failed: Error: Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment
at SdkProvider.resolveEnvironment (/Users/me/workspace/mysstapp/serverless-infra/node_modules/sst-cdk/lib/api/aws-auth/sdk-provider.ts:208:13)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at CloudFormationDeployments.prepareSdkFor (/Users/me/workspace/mysstapp/serverless-infra/node_modules/sst-cdk/lib/api/cloudformation-deployments.ts:236:33)
at CloudFormationDeployments.deployStack (/Users/me/workspace/mysstapp/serverless-infra/node_modules/sst-cdk/lib/api/cloudformation-deployments.ts:162:70)
at CdkToolkit.deploy (/Users/me/workspace/mysstapp/serverless-infra/node_modules/sst-cdk/lib/cdk-toolkit.ts:194:24)
at Object.deployAsync (/Users/me/workspace/mysstapp/serverless-infra/node_modules/sst-cdk/lib/serverless-stack.ts:122:15)
at /Users/me/workspace/mysstapp/serverless-infra/node_modules/@serverless-stack/core/index.js:71:17
at async Promise.all (index 1)
at deployStacks (/Users/me/workspace/mysstapp/serverless-infra/node_modules/@serverless-stack/core/index.js:48:5)
at Object.parallelDeploy (/Users/me/workspace/mysstapp/serverless-infra/node_modules/@serverless-stack/core/index.js:446:3)
❌ dev-mysstapp-infra-eventbridge failed: Error: Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment
Stack dev-mysstapp-infra-dynamodb
Status: failed
Error: Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment
Stack dev-mysstapp-infra-eventbridge
Status: failed
Error: Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment
✨ Done in 2.93s.
If an error is encountered at the cdk synthesizing step, it exits appropriately, though: There was an error synthesizing your app. error Command failed with exit code 1.
Any ideas why this might be the case? I'm trying to write a deploy script and I'd like for SST to properly exit non-zero when it fails to deploy.
Currently, only the cli is logging to the sst-debug.log
.
yarn start
tsc
will show CLI output, signaling that no config was foundThis configuration is currently not supported because we need to zip the app root for each handler. So after a Lambda's zip is generated, the next Lambda's zip will contain the previous Lambda's zip inside .build, and the previous Lambda's zip inside cdk.out.
One solution would be to cherry pick what to zip. For example, zip should only include the esbuid's output (ie. .js and .js.map files) from the .build folder.
Also need to clear all .build folders generated from Lambda functions that has srcPath.
I added a new service to my deployment pipeline which builds a static site and uploads it to s3. I'm getting an error that I haven't seen on any other services and I'm not sure where to start debugging this one
====================
🚀 Deploy
====================
$ cd /tmp/seed/source
INFO: before_deploy hook not found. You can define it in your build spec.
INFO: Learn more about adding a build spec - seed.run/docs/adding-a-build-spec
$ cd /tmp/seed/source/clients/web/web-infra
INFO: Deploying 1 stack...
❌ dev-web-infra-my-stack: ENOENT: no such file or directory, open '/var/task/bootstrap-template.yaml'
Hello,
I've got a stack built with SST that I can deploy. When trying to run a command with CDK, I get nothing back as if it isn't executed.
$ npx sst cdk list
Preparing @serverless-stack/resources
Linting source
Compiling with Babel
list
can be replaced by any other CDK command and I get the same result.
npx version is 10.2.2, SST is 0.4.3 and I'm on OSX.
Windows 10
npx create-serverless-stack@latest myapp --language typescript
cd myapp
npx sst build
following error
Running type checker
Error: There was a problem finding typescript
at getBinPath (C:\working\myapp\node_modules\@serverless-stack\cli\scripts\util\cdkHelpers.js:45:11)
at typeCheck (C:\working\myapp\node_modules\@serverless-stack\cli\scripts\util\cdkHelpers.js:210:9)
at runChecks (C:\working\myapp\node_modules\@serverless-stack\cli\scripts\util\cdkHelpers.js:236:48)
at prepareCdk (C:\working\myapp\node_modules\@serverless-stack\cli\scripts\util\cdkHelpers.js:362:9)
There was a problem type checking the source.
I changed @serverless-stack\cli\scripts\util\cdkHelpers.js:40
from filePath.match(/(^.*\/node_modules)\/.*$/);
to filePath.match(/(^.*[\/\\]node_modules)[\/\\].*$/);
and it works
After this fixed then I get another issue
Type checking Lambda function source
TypeError: Cannot read property 'toString' of undefined
at App.typeCheck (C:\working\myapp\node_modules\@serverless-stack\resources\src\App.ts:263:28)
at C:\working\myapp\node_modules\@serverless-stack\resources\src\App.ts:193:12
at Array.forEach (<anonymous>)
at App.processInputFiles (C:\working\myapp\node_modules\@serverless-stack\resources\src\App.ts:190:38)
at App.synth (C:\working\myapp\node_modules\@serverless-stack\resources\src\App.ts:159:12)
at process.<anonymous> (C:\working\myapp\node_modules\@aws-cdk\core\lib\app.ts:123:45)
at Object.onceWrapper (events.js:421:26)
at process.emit (events.js:314:20)
at process.emit (C:\working\myapp\node_modules\source-map-support\source-map-support.js:495:21)
There was an error synthesizing your app.
Hi
I'm following the instruction on this page to initiate sst-app https://serverless-stack.com/chapters/building-a-cdk-app-with-sst.html
However, I keep encountering this error npm ERR! Unexpected end of JSON input while parsing near '...kedSize":449192,"npm-'
How could I fix this?
Currently sst start
sets the websocket endpoint as environment variables for the stub Lambda functions. Lambda@Edge functions do not support environment variables. Look into other ways to pass the information in. Perhaps through origin headers - https://stackoverflow.com/questions/54828808/aws-lambdaedge-nodejs-environment-variables-are-not-supported
Make it easier to create APIs by creating a higher level construct. Need to automatically handle things like cold starts, etc.
Problem is on this webpage under the sample lambda: https://docs.serverless-stack.com/installation
I don't believe entry is a valid property starting with v0.6.0. The sample app uses handler and I can't find entry in the @serverless-stack/resources.
Show the logs from the stub Lambda
and websocket connection handler
that is deployed in the Debug Stack.
Mike had an issue where the DynamoDB table was manually removed from the debug stack. And when sst start
tries to send a websocket call to register itself, the websocket call returned "Internal Server Error".
Noah also ran into a similar issue.
sst start
, auto-detect missing resources in the debug stack. And auto-recreate them.{ srcPath: 'src', entry: 'get.ts', handler: 'main' }
{ srcPath: 'src', handler: 'get.main' }
I am getting a strange error message when attempting to remove a stack which does not exist. I would think the desired result would be just letting the user know that the stack does not exist.
SST: 0.4.4
CDK: 1.79.0
Preparing @serverless-stack/resources
Linting source
Detected tsconfig.json
Compiling TypeScript
Removing stacks
doesnotexist-aeroluxmaps-infrastructure-website: destroying...
doesnotexist-aeroluxmaps-infrastructure-dynamodb: destroying...
✅ doesnotexist-aeroluxmaps-infrastructure-dynamodb: destroyed
❌ doesnotexist-aeroluxmaps-infrastructure-dynamodb failed: TypeError: Cannot destructure property 'status' of '(intermediate value)' as it is undefined.
✅ doesnotexist-aeroluxmaps-infrastructure-website: destroyed
❌ doesnotexist-aeroluxmaps-infrastructure-website failed: TypeError: Cannot destructure property 'status' of
'(intermediate value)' as it is undefined.
Add a doc on accessing AWS account id inside a Stack.
sst build
fails). The user now wants to remove the app and start fresh but cannot because sst remove
fails at the build step.Create a SST bucket in the user's S3 account that stores the app's latest deployed state. And sst remove
does not rebuild the app, but rather remove using the state.
Create a separate site for docs and move the READMEs over. Also, include a quick start guide.
Serverless 3.0 is changing the naming convention to ${service}-${stage}:
however, the logicalPrefixedName function is not in sync:
the SST scoped naming should also honor this as well so all stacks and resources are aligned:
sst start
console shows the build failedThe AWS CDK is up to 1.78.0
and this one is still on 1.61.0
, Any chance we can get that updated to be closer to recent?
I am trying to setup Jest so that I can have my test files inside of my lib
folder. Just based on preference. The problem here is that if a build was performed, it generates those test files in the build
folder. Normally I can just use the testPathIgnorePatterns
config in Jest. But currently you are not allowing me to override that particular config. Are there any reasons for this?
Windows 10
I have a fairly simple cdk file that creates a load balancer and containter.
I get the follow error...
Note: If I hack the source and remove .js file type checking then it works fine
npx sst build
Preparing your SST app
Detected tsconfig.json
Transpiling source
Linting source
Error: spawnSync node ENAMETOOLONG
at Object.spawnSync (internal/child_process.js:1070:20)
at Object.spawnSync (child_process.js:602:24)
at Function.spawnSync [as sync] (C:\working\myapp\node_modules\cross-spawn\index.js:26:23)
at lint (C:\working\myapp\node_modules\@serverless-stack\cli\scripts\util\cdkHelpers.js:176:26)
at runChecks (C:\working\myapp\node_modules\@serverless-stack\cli\scripts\util\cdkHelpers.js:237:30)
at prepareCdk (C:\working\myapp\node_modules\@serverless-stack\cli\scripts\util\cdkHelpers.js:363:9) {
errno: -4064,
code: 'ENAMETOOLONG',
syscall: 'spawnSync node',
path: 'node',
spawnargs: [
'C:\\working\\myapp\\.build\\eslint.js',
'--color',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-elasticloadbalancingv2\\lib\\elasticloadbalancingv2.generated.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\region-info\\lib\\default.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\region-info\\lib\\fact.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\region-info\\lib\\region-info.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\region-info\\lib\\built-ins.generated.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\region-info\\lib\\index.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\util.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\principals.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\policy-statement.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\policy-document.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\iam.generated.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\managed-policy.js',
'C:\\working\\myapp\\node_modules\\constructs\\lib\\aspect.js',
'C:\\working\\myapp\\node_modules\\constructs\\lib\\metadata.js',
'C:\\working\\myapp\\node_modules\\constructs\\lib\\private\\dependency.js',
'C:\\working\\myapp\\node_modules\\constructs\\lib\\private\\stack-trace.js',
'C:\\working\\myapp\\node_modules\\constructs\\lib\\private\\uniqueid.js',
'C:\\working\\myapp\\node_modules\\constructs\\lib\\construct.js',
'C:\\working\\myapp\\node_modules\\constructs\\lib\\index.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\grant.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\policy.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\private\\immutable-role.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\role.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\user.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\group.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\lazy-role.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\identity-base.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\unknown-principal.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\oidc-provider.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-iam\\lib\\index.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-ec2\\lib\\peer.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-ec2\\lib\\connections.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-ec2\\lib\\ec2.generated.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\cloud-assembly\\schema.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\cloud-assembly\\metadata-schema.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\cloud-assembly\\artifact-schema.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\cloud-assembly\\context-queries.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\cloud-assembly\\index.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\assets\\schema.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\assets\\docker-image-asset.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\assets\\file-asset.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\assets\\aws-destination.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\assets\\index.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\jsonschema\\lib\\helpers.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\jsonschema\\lib\\attribute.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\jsonschema\\lib\\scan.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\jsonschema\\lib\\validator.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\jsonschema\\lib\\index.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\internal\\constants.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\internal\\debug.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\internal\\re.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\internal\\identifiers.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\classes\\semver.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\parse.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\valid.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\clean.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\inc.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\compare.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\eq.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\diff.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\major.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\minor.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\patch.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\prerelease.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\rcompare.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\compare-loose.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\compare-build.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\sort.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\rsort.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\gt.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\lt.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\neq.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\gte.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\lte.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\cmp.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\coerce.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\classes\\range.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\classes\\comparator.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\functions\\satisfies.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\ranges\\to-comparators.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\ranges\\max-satisfying.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\ranges\\min-satisfying.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\ranges\\min-version.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\ranges\\valid.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\ranges\\outside.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\ranges\\gtr.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\ranges\\ltr.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\ranges\\intersects.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\ranges\\simplify.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\ranges\\subset.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\node_modules\\semver\\index.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\manifest.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cloud-assembly-schema\\lib\\index.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\aws-ec2\\lib\\security-group.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cx-api\\lib\\cxapi.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cx-api\\lib\\context\\vpc.js',
'C:\\working\\myapp\\node_modules\\@aws-cdk\\cx-api\\lib\\context\\ami.js',
... 609 more items
]
}
There was a problem linting the source.
api.getRoute(routeName: string) => apig.HttpRoute
api.getLambda(routeName: string) => sst.Function
api.addRoute(routeName: string, routeProps: sst.Api.RouteProps);
CDK throws a recursive error if the Lambda function srcPath
is the project root. Currently, we throw an error saying that the srcPath
is invalid.
Create higher level constructs to make it easier to build backends. Things like:
Create a simple screencast view showing how sst start
works.
Update docs with:
How can I move my rootDir? Do I have to put my entire app under lib/
?
error TS6059: File '/.../src/api/foo.ts' is not under 'rootDir' '/.../lib'. 'rootDir' is expected to contain all source files.
I'm not even including this file in any of my CDK files, so I'm not sure why it's being compiled at all for sst build
WIndows 10
npx sst cdk --app=.build/run.js diff
'C:\working\myapp\node_modules\@serverless-stack\cli\node_modules\.bin\cdk' is not recognized as an internal or external command,
operable program or batch file.
It looks like it's in the top level node modules instead?
Need an option to disable ESLint and need to update the docs:
https://docs.serverless-stack.com/working-locally#linting-type-checking
The sst start
client drops requests when it is reconnecting.
Create a way to view sst start
logs in a UI instead of the terminal. This will help with:
Hello! I'm getting the following error after a basic yarn create serverless-stack resources
. I installed the stack into a subdirectory of a project which has it's own ESLint configuration. I get the following error during yarn build
:
❯ yarn build took 4s 12.18.3 2.4.0
yarn run v1.22.10
$ sst build
Preparing @serverless-stack/resources
Linting source
Oops! Something went wrong! :(
ESLint: 7.11.0
ESLint couldn't determine the plugin "@typescript-eslint" uniquely.
- /Users/me/some-app/infrastructure/node_modules/@serverless-stack/cli/node_modules/@typescript-eslint/eslint-plugin/dist/index.js (loaded in "--config")
- /Users/me/some-app/node_modules/@typescript-eslint/eslint-plugin/dist/index.js (loaded in "../.eslintrc.js » plugin:@typescript-eslint/recommended » ./configs/base")
Please remove the "plugins" setting from either config or remove either plugin installation.
If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Seems this can be resolved by making sure the CLI's ESLint process treats itself as the root via --resolve-plugins-relative-to .
This could also be solved by allowing me to specify my own ESLint config to sst
, or by letting end users skip linting altogether.
const api = new Api(this, "Api", {
routes: {
"GET /notes": "path/to/file.main",
},
});
const api = new Api(this, "Api", {
defaultLambdaProps: {
srcPath: 'services/notes',
environment: { tableName },
initialPolicy: [ new iam.PolicyStatement({
actions: [
"dynamodb:Scan",
...
],
effect: iam.Effect.ALLOW,
resources: [ dbStack.table.tableArn ],
}) ];
},
defaultAuthorizationType: 'AWS_IAM',
routes: {
"GET /": "path/to/list.main",
"GET /notes": "path/to/get.main",
},
});
const api = new Api(this, "Api", {
routes: {
"GET /notes": {
authorizationType: "AWS_IAM",
lambdaProps: { srcPath, handler: "path/to/list.main", environment, initialPolicy },
},
...
},
});
Missing handler shows the built Lambda:
Handler 'handler' missing on module 'services/notes/.build/list.js'
Make it possible to retry a specific Lambda when there are multiple Lambdas invoked as a part of a request.
Hi, is there an example available somewhere of Serverless Framework running with SST? How does the Serverless Framework know about resources created by the SST?
It would be great to set specific Region or profile for particular nested stacks.
Use Case:
Cloudfront Requires the SSL Certificate be hosted in the us-east-1
region. Most people would be hosting everything else in other regions.
Everytime sst build
is run, the generated asset zip is different by +/- 1 byte. This causes CDK to reupload and redeploy the Lambda function on every deploy.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.