Ross Coundon
05/14/2022, 7:46 AMsst update
against v1.0.11 and the result was 0.0.0-20220514063514Boris Tane
05/14/2022, 11:15 PMsst.ApiGatewayV1Api
doesn't support it
https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-apigateway.SpecRestApi.htmljustindra
05/16/2022, 1:09 PM// from
app.setDefaultRemovalPolicy(cdk.RemovalPolicy.DESTROY);
// to
app.setDefaultRemovalPolicy("destroy");
Instead of allowing both?Ivan Roskoshnyi
05/16/2022, 1:30 PMpug
with SST
? I am facing the following error: No loader is configured for ".pug" files:
Drew
05/16/2022, 5:12 PMPaul Swail
05/17/2022, 2:10 PMDavid Martin
05/17/2022, 7:14 PMsst deploy --stage prod
. obviously that’s not the technique i want to use going forward.
my current plan is to use SEED as you describe here (https://serverless-stack.com/chapters/getting-production-ready.html) .
• is SEED still the path you’d recommend?
• what other things should i be aware of for my production deployment process?
thank you!Adrián Mouly
05/17/2022, 10:03 PMAdrián Mouly
05/18/2022, 3:27 PMpackage.json
?
In that case, how I know the version? should I use the latest?
My concern is having conflicts with the dependency from SST package.Emanuel Bohnenkamp
05/18/2022, 3:55 PMDaniel Ashcraft
05/18/2022, 4:09 PMaws-cdk-lib/aws-opensearchservice
and sst v1.1Drew
05/19/2022, 6:00 AMIvan Roskoshnyi
05/19/2022, 9:12 AMmiddy-validator
to validate requests in SST
is there a way to add custom message? Also...is it related to middy or JSON schema validation
? Tried to google it but found nothingTrey Overton
05/19/2022, 2:02 PMRoss Coundon
05/19/2022, 5:26 PMaddDfaultFunctionLayers
, addDefaultFunctionEnv
but on/from App?Paul Swail
05/20/2022, 11:42 AMPaul Swail
05/20/2022, 11:49 AMvitest
is the test runner bundled in the starter templates. Is that what most of you are using? It’s the first I’ve heard of this framework, having mainly used Jest. Looking at the docs it looks the same API as Jest. Any gotchas to be aware of if switching to this from Jest?Paul Swail
05/20/2022, 2:06 PM/{appName}/{stage}
prefixoutaTiME
05/20/2022, 5:02 PM"Internal Server Error"
unless I disable it by putting "none"
.
Here I could see the call to the authorizer does it correctly but then it does not execute the endpoint:
0a034172-e51c-4560-9206-f7758fd9aee0 REQUEST dev-ambito-dolar-stack-AuthorizerBD825682-RMeuTtqz2uyr [src/authorizers/basic.main] invoked by API GET /social-notify
0a034172-e51c-4560-9206-f7758fd9aee0 RESPONSE {"isAuthorized":true}
I tried to reduce everything to the minimum possible code, here I attach my definitions:
// stack
const api = new sst.Api(stack, 'Api', {
accessLog: {
retention: 'one_week',
},
authorizers: {
basicAuthorizer: {
type: 'lambda',
function: new sst.Function(stack, 'Authorizer', {
handler: 'src/authorizers/basic.main',
}),
},
},
defaults: {
authorizer: 'none',
function: {
environment: {
SNS_TOPIC: topic.topicArn,
},
},
},
routes: {
'GET /social-notify': {
authorizer: 'basicAuthorizer',
function: 'src/routes/social-notify.handler',
},
},
});
// src/authorizers/basic.main
export const main = async (event) => {
const isAuthorized = process.env.SECRET_KEY === event?.headers?.authorization;
return {
isAuthorized,
};
};
// src/routes/social-notify.handler
export async function handler(event) {
// pass
return {
headers: { 'Content-Type': 'application/json; charset=utf-8' },
body: JSON.stringify({
// pass
}),
statusCode: 200,
};
}
Ivan Roskoshnyi
05/21/2022, 1:48 PMREGION: stack.region,
USER_POOL_ID: auth.userPoolId,
IDENTITY_POOL_ID: auth.cognitoIdentityPoolId,
USER_POOL_CLIENT_ID: auth.userPoolClientId,
among lambda functions in SST?
My stacks are being called in the following way:
app
.stack(ApiStack)
.stack(StorageStack)
.stack(AuthStack)
.stack(SocketStack)
.stack(FrontendStack)
This is a new SST API so I had to use API Stack
in Auth Stack
via sst.use
What is interesting is API Stack
had being imported in Auth Stack
to attach permissions. BUT when I am trying to do smth like this:
const lambda = api.getFunction('POST /routeName')
lambda?.addEnvironment(
'USER_POOL_ID',
auth.userPoolId
)
I am getting the following error in the terminal
Error: 'dev-ApiStack' depends on 'dev-sst-AuthStack' (dev-sst-ApiStack -> dev-sst-AuthStack/Auth/UserPool/Resource.Ref, dev-sst-ApiStack -> dev-\sst-AuthStack/Auth/IdentityPool.Ref, dev-sst-ApiStack -> dev-sst-AuthStack/Auth/UserPoolClient/Resource.Ref). Adding this dependency (dev-sst-AuthStack -> dev-sst-ApiStack/API/Api/Resource.Ref) would create a cyclic reference.
jamlen
05/23/2022, 12:14 PMAdrián Mouly
05/23/2022, 4:04 PMReactStaticSite
.
I created one stack for each of them, now, I want to use the same domain to access them, but changing the path.
Like: <http://mycompany.com/site1|mycompany.com/site1>
, <http://mycompany.com/site2|mycompany.com/site2>
…. etc.
Is there a way to do this in the configuration?
My idea is to have separated CFront Distributions for each, but sharing the same domain.Adrián Mouly
05/24/2022, 5:44 PMsst update
, but this didn’t update the resources
package?Klaus
05/24/2022, 6:06 PMfix
is also interesting, as it suggests to downgrade SSTEmanuel Bohnenkamp
05/24/2022, 6:39 PMAdrián Mouly
05/24/2022, 6:47 PMsst test
has been removed, right?
How should I execute my existing tests? also, should I migrate to Vitest?Selo
05/26/2022, 5:28 PMDan Suceava
05/26/2022, 10:46 PMMischa Spiegelmock
05/27/2022, 12:26 AM