Ross Gerbasi
02/04/2022, 5:56 PMDevin
02/04/2022, 7:40 PMs3Deployment
step that I can’t really figure out how to integrate into that static site construct.
const site = new sst.StaticSite(this, "site", {
path: "website",
errorPage: "404.html",
buildOutput: "public",
buildCommand: "npm run build",
customDomain: getCustomDomain(scope.stage),
s3Bucket: {
// in here I can set publicReactAccess and removal along with moving the index doc here
}
s3Deployment: // does not exist, I'd expect it to but maybe I just need to call cdk directly to host a static site?
})
Jacob Hayes
02/04/2022, 9:09 PMIamgingertrash
02/05/2022, 4:09 PMsst.Stack
- I'm trying to hook up external monitoring and using this.getAllFunctions()
but it throws an error saying that getAllFunctions
is not a functionKristian Lake
02/05/2022, 6:51 PMGarret Harp
02/05/2022, 11:18 PMaws-cdk-lib/aws-logs
?Iamgingertrash
02/07/2022, 4:17 AMJason
02/07/2022, 2:29 PMDavid Garcia
02/07/2022, 6:19 PMyarn deploy
https://docs.serverless-stack.com/working-locally#deprecating-the-stage-option-in-the-sstjson
Something about stage option being deprecated, but this link leads to nowhere regarding this informationJohn
02/08/2022, 3:23 AMAsh Rhazaly
02/08/2022, 3:48 AMTim Alander
02/08/2022, 4:12 AMAPI.ts
--> this uses sst.Api
Storage.ts
--> this uses rds.ServerlessCluster
How can I give the API stack permission to access the RDS instance. I see examples where you can do api.attachPermissions
from within API.ts
, but then I don't have reference to the RDS construct.
Is there a pattern for passing around construct references in the constructors of the stacks? How else would you accomplish this?
Thanks!Daniel Gato
02/08/2022, 1:16 PMDan Beaven
02/08/2022, 1:33 PMdefaultAuthorizer: HttpUserPoolAuthorizer
however I need some routes to be public and adding authorizationType: sst.ApiAuthorizationType.NONE
to the public routes config doesn't remove the authorisation from api gateway. I also tried removing defaultAuthorizer
and instead adding authorizer:HttpUserPoolAuthorizer
on the individual route config however this resulted in no authorizer being attached and all routes being public any ideas what I am doing wrong?Slackbot
02/08/2022, 9:16 PMDan Van Brunt
02/08/2022, 9:21 PMsst.StaticSite
and I’d like to create a SECOND distro with a different domain and WAF but pointed at the same origin/bucketDaniel Gato
02/09/2022, 1:12 PMDan Van Brunt
02/09/2022, 2:51 PMcf.CachePolicy.CACHING_DISABLED
?
I basically want NO caching… but I DO want CF to passthrough the querystringsDan Beaven
02/09/2022, 4:30 PM<http://auth.staging.site.com|auth.staging.site.com>
and <http://staging.site.com|staging.site.com>
however Rout53 requires that an A record exist for a subdomain before it can create a nested sub-domain. The NextJS stack relies on parameters from the Auth stack so I cant just deploy the NextJS site first. When I add a temporary A record entry for <http://staging.site.com|staging.site.com>
the auth stack deploys fine however the NextJS stack fails saying it couldn't create the domain A record because one already exists. Does anyone have any ideas on how to get around this?David Garcia
02/09/2022, 4:50 PMDavid Garcia
02/09/2022, 6:29 PMyarn deploy
the status of my stack in the console is Status: no changes
Kujtim Hoxha
02/09/2022, 8:21 PMMichael Bannon
02/09/2022, 9:22 PMBshr Ramadan
02/09/2022, 11:52 PMlambda-code-updater
in NextJs used for?
actually I am getting this recommendation from compute optimizer for this lambda functionSam Hulick
02/10/2022, 1:39 AMBogdan
02/10/2022, 3:05 AMYap Yee Qiang
02/10/2022, 4:46 AMPablo Fernandez
02/10/2022, 9:17 AMprod-ww3-api failed: The domain name you provided already exists. (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException; Request ID: 04242074-0225-44bc-a8d1-a1cf94aef985; Proxy: null)
It is correct that the domain name already exists, it's handled by CDK, it has many more entries (email, and other things). The frontend didn't have a problem with the domain existing though, it just injected the records into it.Pablo Fernandez
02/10/2022, 10:59 AMReactStaticSite
I've defined domainName
and domainAlias
. domainAlias
seems to both get an A
and AAAA
record but domainName
seems to be missing the AAAA
record. Is this a bug? is this intended? did something silently fail on my deployment?Fazi
02/10/2022, 11:41 AMconst authorizer = new HttpLambdaAuthorizer({
authorizerName: 'authorizer',
handler: new Function(this, 'Authorizer', {
functionName: 'AuthorizerFn',
srcPath: "src",
handler: 'authorizer.main',
tracing: lambda.Tracing.DISABLED,
timeout: 30,
permissions: ['ssm'],
}),
resultsCacheTtl: Duration.seconds(0),
responseTypes: [HttpLambdaResponseType.SIMPLE],
});
I then want to apply it to a specific route as follows:
const api = new Api(this, "Api", {
// defaultAuthorizationType: ApiAuthorizationType.JWT,
// defaultAuthorizer: new HttpUserPoolAuthorizer({
// userPool,
// userPoolClient,
// }),
// defaultAuthorizationType: ApiAuthorizationType.CUSTOM,
defaultAuthorizer: authorizer,
routes: {
// some other routes go here
"GET /v1/tasks/alt": {
function: getTasksAltFunction,
authorizationType: ApiAuthorizationType.CUSTOM,
},
// some other routes go here
},
});
However, when I make a call to GET /v1/tasks/alt
I get a unauthorized error.
Can someone please explain what is going wrong? I used the docs here: https://docs.serverless-stack.com/constructs/Api#adding-lambda-authorization-to-a-specific-route