colin
07/20/2021, 9:18 PMApolloApi
route versus the SST AppSyncApi
route… It seems like AppSync is pretty limiting with regards to how you can configure your resolvers i.e. if you want to run some javascript on a field resolve, it will be in a different lambda and data source, preventing any sort request batching… What was your experience on either piece of tech?Santiago Kent
07/21/2021, 1:52 AMsst
is really making it easy for me!
I just started creating something, i have an API and i just now included an authorizer using cognito and configured Api to use that as default using IAM, my question now (Because i didn’t see this part on the docs) is how do i actually sign up fairly quickly on my local for testing the various lambdas, any directions or pointers are welcome here! Thank youRicardo Arancibia
07/21/2021, 6:45 PMMuhammad Ali
07/21/2021, 8:05 PMaws cognito-idp sign-up \
--region us-east-1 \
--client-id 4j2fxxxxxxxxxxxxxxxxxxxxxx \
--username <mailto:admin@example.com|admin@example.com> \
--password Passw0rd!
An error occurred (NotAuthorizedException) when calling the SignUp operation: Unable to verify secret hash for client 4j2fxxxxxxxxxxxxxxxxxxxxxx
Any idea?Carlos Ribeiro
07/22/2021, 1:48 PMLouis Barclay
07/22/2021, 9:30 PMthdxr
07/22/2021, 10:14 PMthdxr
07/22/2021, 10:44 PM18IT002 SUNNY AGRAWAL
07/23/2021, 9:39 AMPranav Tadikonda
07/23/2021, 2:35 PMlet saslprep;
try {
saslprep = require('saslprep');
} catch (e) {
// don't do anything;
}
and later…
if (cryptoMethod === 'sha256' && saslprep == null) {
emitWarningOnce('Warning: no saslprep library specified. Passwords will not be sanitized');
}
This causes my error monitoring to go haywire because it seems that saslprep
is null due to some kind of issue with runtime imports of packages. Most Stack Overflow just says to install saslprep
but that hasn’t solved the problem. Is there a way to explicitly define external dependencies like I would in a webpack config? Or any ideas how to solve this problem? Link for reference: https://stackoverflow.com/questions/53266471/saslprep-warning-when-using-mongoclient-connect/57234317#57234317geekmidas
07/23/2021, 4:33 PMClayton
07/23/2021, 7:25 PMMuhammad Ali
07/24/2021, 3:53 AM18:58 error Trailing spaces not allowed no-trailing-spaces
✖ 1 problem (1 error, 0 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
Now here are 2 questions.
1. I am using VSCode, is there a way that it can automaticlaly fix this as i save the file?
2. Which command i can use with --fix
flag? I used serverless invoke ... ... --fix
and it didn't work outAditya Shahani
07/24/2021, 4:01 PMI keep getting the following response in my browser from API Gateway: “Access to XMLHttpRequest at ‘https://API_ID.execute-api.us-east-1.amazonaws.com/PATH’ from origin ‘http://localhost:3000’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”
In my response, I set the following headers:
headers: { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Credentials': true, 'Content-Type': 'application/json', }
I also setin my serverless.yml for each function defined.cors: true
It is odd that other POST method APIs are working fine, but my GET method API keeps throwing this error. Has anyone seen this type of issue before?
brent
07/24/2021, 9:25 PMcreate-react-app
application. Seem to be able to get through deployment fine when I use StaticSite
:
const dashboard = new StaticSite(contentApiStack, "AuthSPA", {
path: "../js/auth-spa/src",
buildCommand: "yarn run build",
});
but when I use the fancy new ReactStaticSite
:
const dashboard = new ReactStaticSite(contentApiStack, "AuthSPA", {
path: "../js/auth-spa/src",
buildCommand: "yarn run build",
environment: {
REACT_APP_CONTENT_API: "...",
REACT_APP_TINA_API_URL: "...",
REACT_APP_BASE_HOSTNAME: "..."
},
});
I'm getting: dev-tina-cloud-stack-content-api-stack | CREATE_FAILED | Custom::SSTBucketDeployment | AuthSPACustomResource7B33DD08 Received response status [FAILED] from custom resource. Message returned: 'NoneType' object is not iterable (RequestId: ce075f86-efb9-49f0-9edc-bf8016b57e78)
Happy to move this into a GH issue if you'd rather!colin
07/25/2021, 4:48 PMRuntime.ImportModuleError: Error: Cannot find module 'ts-tiny-invariant'
Require stack:
- /var/task/server.js
- /var/runtime/UserFunction.js
- /var/runtime/index.js
at _loadUserApp (/var/runtime/UserFunction.js:100:13)
at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)
at Object.<anonymous> (/var/runtime/index.js:43:30)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47
Ashishkumar Pandey
07/26/2021, 4:37 AMHttpJwtAuthorizer
that I need to share across some stacks. I am initialising these authorizers in a separate stack called PreStack
. How can I share these authorizers from PreStack
so that my other stacks can refer to the same authorizers?Guy Shechter
07/26/2021, 7:33 PMroutes: {
'GET /': 'src/lambda.handler',
},
I used to be able to do this:
defaultFunctionProps: {
srcPath: 'src',
},
routes: {
'GET /': 'lambda.handler',
},
but now, it throws an error:
Error: Cannot find a "tsconfig.json" in the function's srcPath: /src
Mr.9715
07/28/2021, 9:07 AMSakar
07/28/2021, 3:34 PMAaron McCloud
07/28/2021, 10:57 PMbabel.config.js
:
//babel.config.js
module.exports = {presets: ['@babel/preset-env']}
Adrián Mouly
07/30/2021, 4:10 AMssm.getParameter(key, (err: AWS.AWSError, data: AWS.SSM.GetParameterResult)=>{
But do this instead:
await ssm.getParameter(key).promise();
Sam Hulick
07/30/2021, 5:54 PM<stage>-coretest-<stack name>
. is this a best practice, to just have a single folder that contains all of our microservices? so basically the stacks would be <stage>-<app name>-<stack name>
?Sam Hulick
07/30/2021, 6:39 PMyarn start
, I see I get a debug stack spun up. but what if another dev also runs yarn start
? how do we test in isolation? and (probably a tougher question to answer), how would a dev running either a local instance of a Vue app (or deployed to a preview branch) point that Vue app to use their debug/test API?Sam Hulick
07/30/2021, 7:09 PMstart
process? just manually delete the debug stack?Sam Hulick
07/30/2021, 7:32 PMSam Hulick
07/30/2021, 8:49 PMVishal Vijay
08/01/2021, 7:12 AMVishal Vijay
08/01/2021, 4:32 PMSam Hulick
08/01/2021, 11:12 PM