Alexis Levasseur
03/31/2022, 2:06 PMcors: true,
defaultAuthorizationType: ApiAuthorizationType.AWS_IAM,
The problem is that I need to add a route that calls into a lambda in order to handle the preflight calls.
'OPTIONS /{proxy+}': {
function: 'src/functions/api/options.main',
authorizationType: ApiAuthorizationType.NONE,
},
The lambda simply returns the proper headers:
return {
statusCode: 204,
body: '',
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': '*',
'Access-Control-Allow-Headers': '*',
},
};
It does work, but I hate the fact that I need to manage my own lambda to do CORS.
Anyone here got it working without having to go through all this? I suppose there is a way to add a route to the sst.API without specifying an integration right? (I can do that using the console)
Any help would be greatly appreciated.Dan Van Brunt
03/31/2022, 2:14 PM: Error: Cannot find module 'chrome-aws-lambda'\nRequire stack: /Users/me/Projects/idx/.sst/artifacts/klick-packages
Getting this when trying to sst start
from a SST app that imports a yarn linked
construct that in-turn implements a lambda that “should” be implementing a layer with ``chrome-aws-lambda` in it.
Any ideas how to fix so I can test this function?
Does sst.Function
implement layers when using sst start
?Jacoby
03/31/2022, 2:22 PMeslint-config-serverless-stack
while upgrading sst from 0.60.4
to 0.69.3
. 🐛
There seems to be a dependency mismatch in eslint-config-serverless-stack
.
Basically, specified versions for @typescript-eslint/eslint-plugin
and @typescript-eslint/parser
specify a different eslint
peer dependency. Take a look at the error when I try to install inside eslint-config-serverless-stack
:
user@DESKTOP-FEN9EV4 ~/Documents/serverless-stack/packages/eslint-config-serverless-stack (master)
λ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: eslint-config-serverless-stack@0.69.3
npm ERR! Found: eslint@8.12.0
npm ERR! node_modules/eslint
npm ERR! eslint@"^8.10.0" from the root project
npm ERR! peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0" from @typescript-eslint/eslint-plugin@5.17.0
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR! @typescript-eslint/eslint-plugin@"^5.12.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0" from @typescript-eslint/parser@4.33.0
npm ERR! node_modules/@typescript-eslint/parser
npm ERR! @typescript-eslint/parser@"^4.15.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\user\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2022-03-31T14_12_11_758Z-debug.log
I get the same error when I try to install stuff in my own project after upgrading sst versions.
Im not the wisest guy when it comes to npm, but it just looks like the parser's version should be updated to match eslint-plugin's. Let me know what you think 🤔Omi Chowdhury
03/31/2022, 10:26 PMThomas Ankcorn
04/01/2022, 8:49 AMKarolis Stulgys
04/01/2022, 11:31 AMnestjs
app to aws
using serverless stack cli
?Adrian Schweizer
04/01/2022, 2:32 PMSeth Geoghegan
04/01/2022, 4:22 PMApiDestination
, so I think it's supported by CDKKarolis Stulgys
04/01/2022, 9:37 PMnpx sst start
everything works fine with the endpoint.
Then I npx sst deploy --stage prod
and I get an error on the frontend:Karolis Stulgys
04/02/2022, 8:13 AMKarolis Stulgys
04/02/2022, 2:27 PMnpx sst start
Uday Bhaskar Gajavalli
04/02/2022, 2:54 PMKarolis Stulgys
04/03/2022, 12:05 AMBrinsley
04/04/2022, 11:14 AM❌ <stack-name> failed: The <stack-name> stack contains no resources.
Despite the stack creation completing successfully. Doesn't look to be any actual errors thought.David Tsai
04/04/2022, 4:20 PMNextjsSite
plugin. However, my app utilizes RDS as its datastore behind a VPC and as far as I can tell it's not possible for Lambda@EDGE to connect to RDS behind a VPC. Is this true? If so, is there another recommended way I could deploy my app securely?Wes Morgan
04/04/2022, 4:20 PMTim V
04/04/2022, 6:23 PMMischa Spiegelmock
04/04/2022, 7:31 PMmish-sequencer-DynamoTable | UPDATE_FAILED | AWS::DynamoDB::Table | AppTableA64782C6 | CloudFormation cannot update a stack when a custom-named resource requires replacing. Rename mish-sequencer-AppTable and update the stack again.
Karolis Stulgys
04/05/2022, 8:39 AMgithub action
that on marge
to main
branch, deploys my stack?Seth Geoghegan
04/05/2022, 1:41 PMsst.TableFieldType.STRING
went away at some point?
Property 'TableFieldType' does not exist on type 'typeof import("/Users/sgeoghegan/dev/dynamodb-eventbridge/node_modules/@serverless-stack/resources/dist/index")'.ts(2339)
Cody Dunlap
04/05/2022, 1:45 PMTable
construct for DynamoDB. When I build and deploy the stack, the resources get created as expected in my AWS account, but SST reports that the deploy failed because my stack ‘has no resources in it’. Any idea what could be causing this?Meris Tarhanis
04/05/2022, 2:01 PMnpx sst start --stage dev
. Just to be clear, I want my React Frontend to be available on the SiteUrl: while I am running the sst start
locally.David Garcia
04/05/2022, 2:30 PMKujtim Hoxha
04/05/2022, 3:34 PMTemplate may not exceed 1000000 bytes in size.
Rafael Sorto
04/05/2022, 5:44 PMDan Van Brunt
04/05/2022, 7:12 PMenableLiveDev
work for Lambda@Edge
functions? Just lamenting to a coworker that Edge functions while VERY powerful and useful, are a HUGE PINT to develop with.Rob N
04/05/2022, 9:18 PMnpx sst start
in my monorepo is just streaming Stacks: Synthesizing changes...
forever.
Anyone know what would cause this?Meris Tarhanis
04/06/2022, 10:07 AMStatus Code 403
while trying to access my API (with AWS_IAM authorization on the endpoint) from the frontend. Might someone know why it's happening?
Down below are logs from CloudWatch, my lambda handler, and the endpoint inside my API Stack. Will provide more info if needed.Erik Robertson
04/06/2022, 10:24 AMbundle: {
externalModules: ['pg-hstore'],
nodeModules: ['mysql2']
},
Now my question is how do I do the equivalent for a cron job definition ? I tried this without success :
new Cron(this, "Cleanup", {
schedule: "cron(0 9 * * ? *)",
job: "src/jobs/cleanup.main",
enableLiveDev: false,
bundle: {
externalModules: ['pg-hstore'],
nodeModules: ['mysql2']
},
});
Also is there any way to set this in a "global" way so that I don't have to repeat it everywhere ?
Thanks !Karolis Stulgys
04/06/2022, 2:16 PM