Michael Orcutt
08/24/2021, 2:59 PMInsufficient permissions to enable logging (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException
Sam Hulick
08/24/2021, 7:01 PMAdriƔn Mouly
08/24/2021, 7:10 PMpath params
apparently are not working? in the Console is not showing anything for those mappings?
Iām mapping from a subdomain to another domain.
This is my code
routes: {
'GET /projects/{projectId}/filters': {
url: `${BASE_URL}/hey-xxxx/projects/{projectId}/filters`,
method: HttpMethod.GET,
timeout: 30,
},
},
Sam Hulick
08/24/2021, 7:53 PMRebuilding infrastructure...
Rebuilding infrastructure failed
no details, no error msg. I just kill the process & rerun it, and itās usually fineAdriĆ”n Mouly
08/25/2021, 11:04 AMGET /careers
, and doesnāt seams to be possible? the URL will be /careers/
.. notice the /
at the end. Is there a way to tell the API to map /careers
and /careers/
?
Also, is there any convention, or best practice on this topic? I have been defining APIs without the ending /
all my life, but maybe is not correct.AdriƔn Mouly
08/25/2021, 11:18 PMā mycomp-vpc-stack failed: The mycomp-vpc-stack stack contains no resources.Iām using an stack to lookup for the existing VPC⦠never failed until I did the update?
Ross Coundon
08/26/2021, 11:37 AMpermissions: [sst.PermissionType.ALL]
in either defaultFunctionProps at the app level or at an individual function level.
I get the error:
Error: Action '*:*' is invalid. An action string consists of a service namespace, a colon, and the name of an action. Action names can include wildcards.
Alex Price
08/26/2021, 1:50 PMsst.Cron
instances in AWS? I've got some basic code and it doesnt seem to be working and I'm not sure how to debug it š¤Blake E
08/26/2021, 7:16 PM--language typescript
but I failed to read through docs to add --use-yarn
and my sst add-cdk
is complaining (and using npm).
Where is this set? Iād like to change this after the boilerplating my project šAdriĆ”n Mouly
08/27/2021, 5:04 AMLuke Wyman
08/27/2021, 7:51 AMAdriƔn Mouly
08/27/2021, 5:15 PMAdriƔn Mouly
08/27/2021, 7:09 PMAdriƔn Mouly
08/27/2021, 8:48 PMsst test
command? In my case Jest is finding some folders outside of my SST project that I donāt want to test.AdriĆ”n Mouly
08/27/2021, 9:15 PMsst test --testPathPattern=test/
for my SST stacks tests⦠any ideas what could be this issue?Blake E
08/27/2021, 9:18 PMcdk.Fn.import_value
for sharing values across sst projects?
for context, I have a SNS Topic setup in project āEventsCoreā, and I want āReaderApiā to subscribe.
this.addOutputs(..)
from EventsCore and import value in ReaderAPI?
Or any cleverness/best-practices I could be considering?Blake E
08/27/2021, 9:43 PMLuke Wyman
08/28/2021, 12:25 AMAuth
stack uses a function in the singers module, because it creates a singer from the user record in the Cognito UserPool in the postConfirmation
Cognito trigger. The Singers
stack points to the singers module, too, because it handles the rest of the singers functionality.
This wasn't an issue back in my Node days, but now seems to be a hassle with Python. Since Python uses srcPath
to point to the folder, and then the route just points to the lambda file itself, it seems that Auth
stack is claiming all the lambda files in the singers folder, and then when the Singers
stack tries to claim the remainder of the lambda files, it can't have any because:
Building Lambda function src/services/singers/KAR_SNG_get_singer_by_id.handler
Error: Asset is already associated with another stack 'test-karaoke-auth'. Create a new Code instance for every stack
I could create a separate folder for that one function that Auth needs, and I will if I have to, but it feels like a bit of a hack. Is there a configuration refinement I can use to not let Auth
be greedy and steal all the lambdas in Singers
?AdriƔn Mouly
08/28/2021, 6:01 AMcdk.context.json
should be added to source control?AdriƔn Mouly
08/28/2021, 6:41 AMcatch
? Looks like has to be any
or unknown
but the linter doesnāt allow it.
71:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
Omi Chowdhury
08/28/2021, 5:27 PMIndexLedgerLinesRule:
Type: AWS::Events::Rule
Properties:
EventBusName: some=eb
EventPattern:
source:
- some-source
detail-type:
- some-detail
Targets:
- Id: IndexLedgerLinesQ
Arn: !GetAtt IndexLedgerLinesQ.Arn
InputPath: '$.detail'
AdriƔn Mouly
08/29/2021, 9:55 PMApi
construct?
Found that documentation shows this example, but HOW we do it with CDK?
aws apigatewayv2 update-stage \
--api-id a1b2c3d4 \
--stage-name dev \
--route-settings '{"GET /pets":{"ThrottlingBurstLimit":100,"ThrottlingRateLimit":2000}}'
Found this on CDK, but this is for GW v1 š© .
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigateway.ThrottleSettings.htmlLuke Wyman
08/30/2021, 1:27 AM0.35.1
for @serverless-stack/cli
and @servlerless-stack/resources
. I'd like to upgrade to v0.40.4
. What is the best yarn command I can run to upgrade, given that my dependencies look like:
"dependencies": {
"@aws-cdk/core": "1.111.0",
"@serverless-stack/cli": "^0.35.1",
"@serverless-stack/resources": "^0.35.1",
"uuid": "^8.3.2"
}
(My confusion seems to be around there being two dependencies that make up serverless-stack)Luke Wyman
08/30/2021, 5:09 AMKAR_ROT_complete_performance.py
, which puts a PerformanceCompleted
event on my event bus. Works great, works great, returns a result with "FailedEntryCount": 0
- all good.
⢠Then, I have a Lambda, called KAR_HST_add_performance.py
, that consumes said event and places it in a performance history dynamodb table.
⢠If I do a npx sst deploy --stage test
and then POST to the API to complete a performance, everything works great. No errors in the CloudWatch logs, and I can see my performance in the performance table. So, it works end-to-end with a deploy
.
⢠If I do a npx sst start --stage test
, my KAR_ROT_complete_performance.py
still works well, but my KAR_HST_add_performance.py
throws the following exception in the terminal:
2d5b30dd-1daa-4bb4-af6b-da4ea4e975cf REQUEST test-karaoke-performance-his-historylogger7C190503-GGOSGWNuWwtH [src/services/performance-history/KAR_HST_add_performance.handler] invoked
SyntaxError: Unexpected token n in JSON at position 0
at JSON.parse (<anonymous>)
at createStrictSyntaxError (/home/lukewyman/Documents/code/karaoke-backend-sst/node_modules/body-parser/lib/types/json.js:158:10)
⢠I've also simplified the subscribed lambda so that I'm not trying to do anything at all with the event:
def handler(event, context):
print('Inside the add performance handler!')
and I still get the exception shown above, while also printing Inside the add performance handler!
to to the terminal.
So, somehow, the subscribed lambda is falling apart with Live Lambda, but working as expected when deployed.AdriƔn Mouly
08/30/2021, 6:10 AMFunction
?AdriƔn Mouly
08/30/2021, 3:30 PMStack amouly-xxx-vpc-stack
Status: failed
Error: The amouly-xxx-vpc-stack stack failed to destroy.
But removing from CF console works fine.Blake E
08/30/2021, 4:35 PMaws-sdk
work against resources?
One limitation with CDK/Cloudform in my experience is the sync
(vs. async
) nature of it all - itās the key reason I do love terraform, ability to interrogate deployed resources and use APIs to modify them (outside of the creation).
Specifically, Iām looking at some additional SNS Topic properties, which led me to https://stackoverflow.com/a/65703536 (and Iāve verified cloudform still does not support modifying these properties).Phil Astle
08/31/2021, 10:47 AMRangeError: Maximum call stack size exceeded
at Object.normalize (path.js:265:12)
at Object.join (path.js:429:18)
at getManager (C:\Users\pa-de\Work\dentr\sst\node_modules\@serverless-stack\core\dist\packager\packager.js:43:33)
at getManager (C:\Users\pa-de\Work\dentr\sst\node_modules\@serverless-stack\core\dist\packager\packager.js:48:12)
at getManager (C:\Users\pa-de\Work\dentr\sst\node_modules\@serverless-stack\core\dist\packager\packager.js:48:12)
at getManager (C:\Users\pa-de\Work\dentr\sst\node_modules\@serverless-stack\core\dist\packager\packager.js:48:12)
at getManager (C:\Users\pa-de\Work\dentr\sst\node_modules\@serverless-stack\core\dist\packager\packager.js:48:12)
at getManager (C:\Users\pa-de\Work\dentr\sst\node_modules\@serverless-stack\core\dist\packager\packager.js:48:12)
at getManager (C:\Users\pa-de\Work\dentr\sst\node_modules\@serverless-stack\core\dist\packager\packager.js:48:12)
at getManager (C:\Users\pa-de\Work\dentr\sst\node_modules\@serverless-stack\core\dist\packager\packager.js:48:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! dentr-sst@0.1.0 deploy: `sst deploy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dentr-sst@0.1.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\pa-de\AppData\Roaming\npm-cache\_logs\2021-08-31T10_40_48_799Z-debug.log
I'm running on Windows 10, if that makes a difference?
I also have a stack that has an environment property check around if to determine whether to deploy it or not, like this:
if (!(skipStatic || isLocal)) {
new AdminSite(app, `${stackIdPrefix}${AdminSite.STACK_SUFFIX}`);
}
Based on one of the bug fixes that went into 0.40.2, about handling empty stacks, I wonder if this could be the issue?Hubert
08/31/2021, 12:10 PMfunctions:
authorizer:
handler: fn_authorizer.lambda_handler
runtime: nodejs14.x
connection-manager:
handler: fn_connection_manager.lambda_handler
events:
- websocket:
route: $connect
authorizer:
name: authorizer
identitySource:
- "route.request.querystring.Auth"
- websocket:
route: $disconnect
This applies the custom authorizer for the $connect route. It's an IAM response. I've noticed that SST does handle IAM authorizer for WebSockets but it doesn't look to handle a custom lambda function to handle the authentication. Is there maybe a CDK solution? Or an SST solution that I'm just missing?
My current solution was to deploy the Websockets via SST and then use the above yaml to attach the authorizer and routes. But this solution relies on cloud watch and cloud watch is lacking proper logging for websockets in my experience.
note: connection-manager has a python runtime (not that this should change anything but yeah).
ThanksBlake E
08/31/2021, 4:24 PM@aws-cdk/assert
package, and itās usage in docs like sst provides - is for interrogating the stack template, NOT deployed resources right?
My team is writing some integration/e2e tests, and I think it would be nice to have some basic tests that poll/wait for some resources to be available - MAYBE itās not required, but for completedness I want to confirm this is not behaviour of cdk/assert and/or is not best practice š thanks!