0:00:25
what is going on guys welcome back to
0:00:27
another session bill break and fix
0:00:30
brought to you by the two of the raw
0:00:38
doing great zayn thanks how are you
0:00:40
fantastic i'm doing fantastic man like
0:00:49
looks like a really hot weather in bali
0:00:52
isn't it today in the background yeah
0:00:55
it's a little bit hot and i think i
0:00:57
think you see my like rice cooker in the
0:01:38
rubbing the mic off on your profit
0:01:41
trousers as in constantly
0:01:45
that's what it feels like
0:02:00
plug it off and then back in again
0:02:11
i think what he's gonna do here is um
0:02:14
come uh as in he's gone then he's gonna
0:02:19
hey gekk there welcome mate good to have
0:02:26
all right and so in the mean while what
0:02:30
i would do is play the acknowledgement
0:02:38
i begin today by acknowledging the
0:02:40
traditional custodians of the land on
0:02:42
which we gather today and pay my
0:02:44
respects to the elders past present and
0:02:46
future i extend their respect to
0:02:49
aboriginal and torres strait islander
0:02:54
fantastic um i need to
0:03:00
light that's behind me behind me yeah
0:03:04
here we go perfect
0:03:08
um hopefully tori comes back
0:03:11
really soon um so i'm just
0:03:14
i'm just a bit of a recap of what we
0:03:17
were trying to do just today was um
0:03:20
triggering a lambda from the websocket
0:03:25
gives us some response
0:03:28
so that is what we're gonna do
0:03:33
we're doing today all right so andy's
0:03:50
still the same mate
0:03:55
you probably do possibly have any other
0:04:12
but i can hear that terrible sound
0:04:24
i think he's gonna try something else
0:04:29
anyway um hopefully uh
0:04:32
he will come back really soon but we can
0:04:34
get started with our action so i'll just
0:04:37
share vs code and we can get started
0:04:50
yes today what we did was we actually
0:05:00
basically it did connect but
0:05:04
it wasn't taking our json
0:05:07
request in so we need to sort that one
0:05:15
this one i've done things yeah
0:05:21
url and what we need to do is basically
0:05:26
uh is it back on not yet
0:05:30
and just kind of put the music on
0:06:11
okay hopefully you guys
0:06:15
if you need better headphones
0:06:26
there might be a bit too loud
0:06:35
to be honest it's interesting you
0:06:37
pointed that fact out because um
0:06:42
the same as soon as i looked at myself
0:06:46
um do you know any and do you have any
0:06:50
suggestions of the
0:06:52
good quality headphones that i should
0:06:55
use as in for a really good voice
0:07:00
and plus there can be
0:07:03
noise cancellation
0:07:07
why do you need headphones
0:07:12
get proper stand mic
0:07:18
you reckon get that
0:07:25
i was thinking i can get a headphone is
0:07:28
if i go somewhere and i'm not able to
0:07:33
come back in time i
0:07:35
i will still have the laptop and i can
0:07:37
still stream from that particular
0:07:40
particular location
0:07:49
i didn't like oh right no idea why no
0:07:56
that's alright i guess that's called
0:07:59
technology isn't it
0:08:02
yeah exactly i don't know i just like
0:08:04
plug things in and out and then work
0:08:10
it's kind of it's kind of like when i
0:08:11
code and then i'm like oh it's it's not
0:08:13
working oh it's working yeah i don't
0:08:18
true though true absolutely
0:08:21
um i just wanted to ask you can you hear
0:08:24
the background music or not
0:08:27
your background music i can't hear
0:08:29
anything you're sounding fine
0:08:32
and then can you hear the background
0:08:44
the viewers don't want background music
0:08:47
probably they don't want my choice no
0:08:52
because there and he seemed to be all
0:09:03
giving a bit of a recap
0:09:06
um so yesterday what we were doing i'll
0:09:09
probably take off this
0:09:15
so we just just today what we were doing
0:09:18
well we were trying to trigger
0:09:22
so that it gives us a response
0:09:27
today we will continue doing that
0:09:30
oh is that your rice cooker
0:09:42
why is it do you hear something you see
0:09:48
you definitely you definitely see it
0:09:49
steaming back there yeah
0:09:54
next time i'm gonna try to i'm gonna try
0:09:56
to find a better space to do it
0:10:01
just that the more i
0:10:11
all right um so yes
0:10:16
right so that that's what we're going to
0:10:18
do so i'll just share my screen again
0:10:21
it's rice it's rice gective
0:10:24
cook rice on this show
0:10:29
right okay so we've already made a
0:10:33
connection so if i type an action
0:10:37
and then a message
0:10:39
is not a message but of value
0:10:46
oh that's healthy i like it
0:10:53
okay so he gave us
0:10:58
let's go and check what what does it say
0:11:13
bali has a lot of rice
0:11:15
that they grow here but the sad part is
0:11:18
if you want different types of rice it's
0:11:21
they're all imports and they're so
0:11:27
or like thai jasmine rice it's like it's
0:11:35
true though and i would i would have
0:11:39
wouldn't be pricey because they're
0:11:42
as in batsman's he comes from india
0:11:46
yeah and i guess they just don't they
0:11:48
don't grow it here i suppose
0:11:53
like in the us they grow they grow it
0:11:55
like domestically a little bit i think
0:11:58
uh geck if gective is asking for some
0:12:17
oh hang on a minute no no no i was
0:12:21
looking at the wrong one
0:12:27
i should actually go into
0:12:30
cloud watch going to cloud formation
0:12:37
um by the way was the first day i ever
0:12:40
done new job today oh really
0:12:45
full of fun man full of fun all i did
0:12:47
was training and meet other members
0:13:03
that would be some kind of record i
0:13:11
no but the thing is that it's only two
0:13:13
of us in in melbourne the rest of the
0:13:16
team is in as in the uk and there's some
0:13:22
so it's pretty much over the globe
0:13:25
well wow that's that's that's
0:13:27
interesting so is the company based in
0:13:32
so the headquarters is in london which
0:13:37
but they're based on globally um
0:13:41
and their office is in the city as well
0:13:46
for melbourne but they've got
0:13:50
um offices all over the world
0:13:54
oh okay that's that's nice that's nice
0:13:57
that's the type of job i want to
0:14:00
just let me work remotely yeah
0:14:06
yeah i don't i don't need to work for a
0:14:12
i thought you were only applying
0:14:16
in the uk i mean i am it's it'll be
0:14:18
easier that way right but like if the
0:14:20
opportunity presented itself and it
0:14:23
wasn't like complicated with
0:14:25
you know like visas or whatever you know
0:14:28
nitty gritty stuff i would i'm down
0:14:31
i don't really care about that i just
0:14:33
understand that it'll be more
0:14:36
complicated more difficult
0:14:41
that wouldn't make sense though
0:14:47
so why isn't this outplaying the logs
0:14:51
what did i miss here again
0:14:56
i'm missing too many things
0:14:59
it was working before what happened
0:15:02
next it's still working but i can't see
0:15:04
the logs for some reason
0:15:08
all because i'm trying to
0:15:12
check in api gateway not the lambda so
0:15:15
probably i need to check in the lambda
0:15:26
connect yeah that's the one
0:15:30
let's see if this one gives us some food
0:15:39
okay so this one didn't even trigger
0:15:43
so what i'm gonna do is actually
0:15:45
put this one in google and see what mr
0:16:05
you had this working
0:16:14
this is another step that i'm doing so
0:16:17
but the connection is working fine
0:16:23
so it is connected to it yes but what we
0:16:26
are working on at the moment is trying
0:16:38
yeah okay now i now i follow
0:17:00
so i need to add a lambda authorized as
0:17:09
okay yes i need to add the lambda of
0:17:11
rice as well why didn't i think of that
0:17:18
so if this was the thing that we
0:17:22
test integration test route
0:17:30
all right i need to add a land of riser
0:17:32
and where did we take that one from
0:17:38
and we were following this one
0:17:41
so i'll just take the lambda off riser
0:17:44
here because this card did it
0:17:54
um wow okay so this is the
0:18:01
no this is not the authorizer
0:18:05
see this little bit document for this
0:18:07
example for the function
0:18:10
yeah this is the authorizer function
0:18:23
request privacy from functional course
0:18:27
all the parameter values
0:18:34
but why do we even need a lambda or
0:18:37
verizon in the first place i don't i
0:18:39
don't understand the concept i was
0:18:42
actually gonna ask you that when you
0:18:44
were done because i don't i don't know
0:18:49
because the only reason i'm
0:18:52
saying that we might need it because
0:18:54
this guy has it and if you see
0:19:02
troubleshoot for free forbidden arrows
0:19:05
using lambda for up no hang on a minute
0:19:08
we're not even using
0:19:12
this doesn't belong to us
0:19:15
thanks for sponsoring our tori
0:19:19
i got carried away
0:19:22
i thought well yeah and i i didn't know
0:19:26
exactly what you and kartik were working
0:19:28
on the other day i was like oh are you
0:19:30
guys adding some type of authentication
0:19:33
now to the websocket
0:19:43
that is that is what the lane is that
0:19:45
what the lambda authorizer would be for
0:19:47
it's like uh to be honest it's for it's
0:19:49
for authentication right
0:19:54
i don't know the difference to be honest
0:19:57
from my instincts i would say you're
0:20:00
right before the authorization
0:20:08
i always forget like what is the
0:20:13
i would have got forbidden from anything
0:20:15
even though things are working
0:20:18
uh huh but no more okay yeah
0:20:22
we have this it connects to a black
0:20:25
socket that triggers the lambda yeah
0:20:27
okay what's going on connection that's
0:20:33
i noticed that's her
0:20:38
so he's drinking python which we don't
0:20:42
but we care about what you might be
0:20:46
into some vpc related limits
0:20:50
don't tell me that we need to implement
0:20:56
no i don't think so i don't think it's
0:21:02
i think it's probably just some small
0:21:13
i always like i always try to check the
0:21:15
simple things first like is the is the
0:21:17
websocket endpoint the same end point
0:21:20
like it didn't change
0:21:22
okay i'll just confirm that so it's
0:21:24
always a good thing to do
0:21:40
um so he wanted uh some
0:21:47
time off until the 11th
0:21:56
so he would hopefully be coming
0:22:01
or after did i say 11 or 12.
0:22:08
something like that
0:22:11
yeah right he's that he's probably at
0:22:16
he's not he's not working
0:22:38
why yeah that is the one
0:22:41
this is on connect
0:22:49
i have this just same session i'm
0:22:51
working correctly and i'll you the
0:22:53
connection is successful but when i try
0:22:55
to send a message get matrix and point i
0:22:58
that's exactly what we're experiencing
0:23:05
solved i had to delete and redeploy the
0:23:12
quite bad i would say that this
0:23:14
was quite clearly and aws spark
0:23:20
and i did not change anything or
0:23:23
anything of my settings
0:23:25
and once again said
0:23:31
cool we can try that
0:23:33
as well if that works for that guy
0:23:48
commands this frequency that i've
0:23:51
actually memorized
0:24:04
oh ah okay yeah i need to specify a
0:24:12
okay so i'm built actually let me do
0:24:17
let me build it now
0:24:58
would you mind doing a bit of research
0:25:00
on um actually what's causing the api
0:25:04
get ready to throw
0:25:06
forbidden when it's actually connecting
0:25:11
yeah i'm i'm reading through this like
0:25:16
okay thread like trying to track it down
0:25:18
right now actually
0:25:43
resource creation come on boy come on
0:25:55
it might it might be zayn like i'm just
0:25:58
kind of taking a guess based on what
0:26:01
it might have to do with the
0:26:12
the post to connection
0:26:19
um let me look in the code
0:26:23
uh what is it the yeah the api gateway
0:26:28
it might have to do with that post to
0:26:34
uh sorry let me hop over to your
0:26:42
you might maybe want to try it without
0:26:50
a 200 or whatever a connection
0:26:54
oh um so it's not uh i wasn't off to the
0:27:02
explained it um so it is connecting to
0:27:06
the websocket but it's not displaying
0:27:13
we need from the lambda so it's i want
0:27:31
can you send me the link to the article
0:27:35
actually why did i do that before
0:27:40
i need to pick up the pace man
0:27:43
so the so they can you get a you get a
0:27:45
like a connection response and that's
0:27:47
good but then immediately you get this
0:27:52
is that what you're saying
0:27:54
yes so as soon as i try to send it a
0:28:08
arrow but in his case he's actually
0:28:19
by his on connect lambda or a different
0:28:21
um he's on a different lambda but for us
0:28:26
lambda we're using
0:28:31
from what i read in the docs maybe and i
0:28:34
don't know if this is totally the right
0:28:38
it may be because the on connect lambda
0:28:42
has specific limitations where
0:28:46
it's triggered when
0:28:48
you're connecting so
0:28:55
so like when the client you know
0:28:59
attempts a handshake with the websocket
0:29:03
then on the aws side
0:29:06
from my understanding
0:29:08
aws the api gateway then like triggers
0:29:11
that lambda based on that connection
0:29:14
event but the connection isn't
0:29:15
completely established until
0:29:24
that so like during dirt when that
0:29:26
lambda is executed
0:29:28
like the connection isn't
0:29:30
fully established yet so you shouldn't
0:29:33
be able to post the message
0:29:36
from what i understood like you would
0:29:38
have to do that in another lambda like
0:29:40
the default lambda
0:29:44
so it may it may even be easier for the
0:29:46
future implementation anyways to try to
0:29:50
try to do this in the default lambda and
0:29:52
then see if the problem is resolved
0:29:56
you know what i'm saying
0:30:04
i mean that's that that's my take on it
0:30:06
it just seems like i feel like there
0:30:08
were a few things i mentioned where like
0:30:13
yeah we couldn't work on those errors
0:30:17
yeah and you were right that um that
0:30:24
so we basically have to change our
0:30:32
oh no no no no sorry my bad my bad how
0:30:48
i was giving you the wrong lambda
0:30:59
i need to fix some stuff now
0:31:05
because the explanation you
0:31:10
good and it it doesn't make sense i
0:31:13
think what i was doing
0:31:20
post to connection
0:31:22
in the connective hammer which obviously
0:31:26
you're right it wouldn't work because
0:31:29
it's just used to connect but inst
0:31:32
what i needed to do was
0:31:35
take this message logic and put that
0:31:38
into a separate lambda
0:31:40
which actually hits and gets triggered
0:31:43
after the on connect
0:31:50
so we basically have to do it in that
0:31:53
just a good old copy and paste
0:32:08
oh i mean i mean from the existing on
0:32:10
connect lambda oh yeah yeah
0:32:15
because like i think i think it's
0:32:17
essentially the same
0:32:23
so basically what we need
0:32:26
is all this code only
0:32:31
so then you get the socket okay get
0:32:38
and then it sends this
0:32:50
okay so if i create another lambda say
0:33:01
i feel like this finally makes sense to
0:33:04
me after a few episodes of working on it
0:33:06
at least the basics of it
0:33:14
well luckily like i said luckily i've
0:33:16
already worked on like node
0:33:22
websocket application looked like
0:33:26
that that helped me give me an
0:33:28
understanding and i thought oh maybe
0:33:29
it's a little bit different the way it
0:33:32
here on aws but actually
0:33:35
well yeah that's true but like not
0:33:37
really like the concept is
0:33:48
preview it as in your experience
0:33:53
laptop is previously is really helping
0:33:58
yeah honestly if you ever if you if you
0:34:00
took probably like you know 30 minutes
0:34:03
or an hour and did a
0:34:09
websocket like node app then you would
0:34:14
very very easily what's going on and
0:34:16
then basically like any time like
0:34:19
this like your web socket server gets uh
0:34:23
gets a message from the client then
0:34:25
amazon it seems i'm just
0:34:28
this isn't exactly what's happening but
0:34:30
like it just seems like amazon on there
0:34:32
and on the api gateway is just looking
0:34:35
the action the route and then just
0:34:37
saying okay like trigger this lambda now
0:34:40
because you sent this
0:34:43
you requested this or you you posted
0:34:46
essentially exactly then go and trigger
0:34:50
so all your like the to me the websocket
0:34:53
is the same as the way it would work in
0:34:54
node.js except now like
0:34:57
instead of handling those
0:35:00
those messages inside of the actual like
0:35:04
node application you're just handling
0:35:09
exactly so whatever we want to do after
0:35:12
the connection is made that's all done
0:35:15
by different lambdas um that can be made
0:35:19
on a single responsibility concept
0:35:24
that makes sense a lot yeah
0:35:26
i i did see a guy like i mean it depends
0:35:29
on if you want to decouple it or not and
0:35:31
probably for this you want to you want
0:35:33
to decouple it i did see like a basic
0:35:36
tutorial where the guy just used one
0:35:38
lambda aside from the connect and
0:35:42
disconnect oh no maybe he didn't maybe
0:35:44
he threw everything inside of one lambda
0:35:46
and then he just had like a switch
0:35:48
similar to what you guys have with your
0:35:51
express app with the router
0:35:55
um for that purpose yeah
0:35:59
i think we should probably go for as
0:36:02
indeed coupling so because i i don't
0:36:05
really want all the logic just in one
0:36:09
i would rather use
0:36:13
one lambda for doing one thing and then
0:36:16
the other lambda for doing another thing
0:36:18
that actually keeps a lot
0:36:21
maintainable and organized
0:36:23
code as well and it's easy to
0:36:26
understand in the first place
0:36:28
yeah i agree that's usually the way i do
0:36:30
it when i'm doing any serverless
0:36:34
and that's the best way right
0:36:38
yeah and then most of the time just like
0:36:40
copying and pasting and then just
0:36:43
a little detail inside pretty much
0:37:12
i've never done it myself though but i
0:37:14
guess if you're doing like graphql
0:37:17
yeah like if you're using a like uh
0:37:20
like a lambda well i don't know if you
0:37:22
can do graphql with lambdas
0:37:25
but like serverless
0:37:27
serverless graphql
0:37:29
then i suppose you have to put
0:37:31
everything in one on one lambda
0:37:41
uh i wouldn't be able to answer that
0:37:46
will have an expert answer as always he
0:37:49
does that would be appreciated
0:37:53
although i you know it's not super
0:37:55
important to what i do but i'm always
0:37:59
that's a really good thing
0:38:04
normally really curious about
0:38:07
this stuff isn't it because it's just a
0:38:12
evolving as in day
0:38:14
to day basis and um
0:38:17
it's really really a steep
0:38:24
geckdev says aws appsync for graphql
0:38:46
okay so we would probably have to make
0:38:49
okay now i'm gonna do do a different
0:38:55
because i cannot be asked to tie for
0:38:58
that's just way too much
0:39:26
would you reckon tory did it work uh i'd
0:39:29
say i think it's gonna work
0:39:34
yeah do you need anything in the
0:39:36
response like the return body or no i
0:39:39
don't think you do right
0:39:46
where was that sorry uh 27. you don't
0:39:49
need anything in the body do you
0:39:54
i just did that because he did it
0:39:56
oh okay whatever maybe you maybe
0:39:59
it's just good to have
0:40:03
let's try that because i've got a funny
0:40:05
feeling that this might cause a problem
0:40:07
and you're right about that
0:40:12
let's give it a try pausing error
0:40:17
why does it show me that
0:40:22
right i've changed it
0:40:30
what does it show me down
0:40:33
pausing there at that one
0:40:53
this is why not don't really like
0:41:03
um just say indentation that yes lens is
0:41:09
complaining about that so
0:41:13
oh it's the eslint yelling at you yeah
0:41:21
no missing semicolon
0:41:34
and that doesn't need
0:41:38
it's just asking you for another
0:41:40
semicolon there is that the problem
0:41:51
that's the problem
0:41:55
all right let's try this see what that
0:42:02
why is that not doing anything ah
0:42:06
i need to send there properly
0:42:08
yeah send and then send a
0:42:14
let's try this and see if this works
0:42:22
if i think i think it's gonna work i
0:42:24
think you'll be good
0:42:27
have faith man have faith
0:42:37
it will work it will work otherwise i'll
0:42:40
just start applying for uber simple
0:42:46
hey before you guys were talking about
0:42:48
like pizza hut is paying like what was
0:42:51
it like 60 an hour or something
0:42:57
um yeah that was in the ringing shorter
0:43:01
job employment period
0:43:04
that deal's over yeah
0:43:08
because i'm ready man 60 an hour for for
0:43:12
whatever i gotta do at pizza huts
0:43:27
oh yeah yeah they got it they got pizza
0:43:29
hut and they got dominoes
0:43:33
i think it might be
0:43:36
finding out how much are they paying
0:43:58
forget the dev stuff i'm becoming a
0:44:05
absolutely if i'm earning that much in
0:44:07
bali like doing pizza stuff like life
0:44:14
i'm a i'm a coder i'm a hobbyist coder
0:44:35
and fifth day is the new yeah i mean the
0:44:37
pizza pays better what can i say yeah a
0:44:42
free lunch free dinner as well
0:44:46
i think here you can get a you can get
0:44:50
four pizzas for like seven us dollars
0:44:57
that's pretty that's really crazy
0:45:11
i'm exploring all options
0:45:19
imagine if you work for pizza hut
0:45:23
the food will be free and how much
0:45:26
can you save on food wow
0:45:29
and on top of on top of that guess 60
0:45:34
well you know if you're in australia
0:45:36
like that's a good deal for sure for
0:45:38
sure i mean i'm i can't no disrespect to
0:45:41
the pizza chain chains out there
0:45:45
but i'm not i'm not
0:45:46
i'm not exactly what you would call a
0:45:54
but like yeah if you get like free lunch
0:45:57
and dinner and 60 dollars an hour in
0:46:00
australia like that's that's
0:46:02
you're gonna do good
0:46:05
oh yeah the kids are gonna have a bright
0:46:14
and multiple chins
0:46:20
all right she just lost any potential
0:46:31
now we can call i need endpoint
0:46:44
this is gonna work okay
0:46:46
code so now we call action
0:47:05
all right where did we go wrong
0:47:07
hey that's cool though at least you got
0:47:11
was that working before where you were
0:47:12
getting the context id and stuff
0:47:17
oh so it's exactly the same
0:47:22
uh why is he not producing the logs
0:47:28
okay i'm gonna get rid of this one
0:47:30
because that's just it for nothing
0:47:40
okay so it's gotta it's gotta do it that
0:47:43
post to connection
0:47:45
thing because that's where you're not
0:47:47
being able to send the message
0:47:55
seems like a common enough problem
0:48:04
but did that and even get triggered
0:48:07
i need to check that as well
0:48:11
well it did because you're you're
0:48:12
getting back that context id um in your
0:48:16
websocket in your ws cat or whatever
0:48:28
like you asked for the connection id and
0:48:34
okay maybe it's different then
0:48:37
but you're getting back something yeah
0:48:40
which is a good thing we just have to
0:48:42
find out as in why isn't giving
0:48:45
us for free which is a forbidden
0:48:51
oh hang on a minute
0:49:00
oh wow oh wow oh wow
0:49:04
lambda function isn't even there in the
0:49:18
like the default lambda
0:49:27
no no no no no no sorry my bad again
0:49:39
so this can be before
0:49:42
test i don't care but this needs to be
0:49:53
if this test room which is the default
0:49:56
one is targeting test
0:49:59
lambda integration
0:50:01
which is over here
0:50:03
and then this one is talk oh
0:50:10
now it's making sense
0:50:20
i think what we basically need to do is
0:50:39
i forgot to define that one over here
0:50:46
well it's great if it's something simple
0:50:51
rather than rather
0:50:53
rather than something horrific you know
0:50:56
that's why i'm happy it's like oh it's a
0:51:03
all right so let's say if we said
0:51:14
we've actually called it before
0:51:18
and this one would be default
0:51:25
yeah we didn't even point out
0:51:28
and then point it to them
0:51:31
correct can i touch it it's better to
0:51:41
okay so now if we do
0:51:45
if we place this lambda in the
0:51:58
if this works then
0:52:00
we would need to find out how to
0:52:06
values of their request to their
0:52:10
respective lambda functions
0:52:13
but that's not been being happening at
0:52:16
the moment what do you mean by that
0:52:25
that whatever the value is here
0:52:29
it needs to invoke
0:52:39
it needs it needs to invoke test
0:52:42
function if it's message it needs to
0:52:44
invoke the message function
0:52:46
but here at the moment we are hard
0:52:53
i i feel a little bit lost but wouldn't
0:52:55
you just handle that on the client side
0:53:02
or am i not understanding
0:53:10
uh so i think what i mean to say is that
0:53:24
you have a web socket and then their
0:53:28
after one test route
0:53:33
which is over here
0:53:36
take you through that as well maybe this
0:53:38
would be easier to understand in that
0:53:44
how these are all the roots
0:53:49
let's root is here
0:53:53
in that kind of room we can have
0:54:02
so the whole concept and how it's
0:54:05
working is that this is the route
0:54:09
this one is the root key
0:54:32
which you would be here
0:54:36
and then this tesla
0:54:39
just landed integration is pointing
0:54:47
this function here
0:54:51
and then this function
0:54:59
which is actually pointing to the
0:55:07
telling you explicitly that we on every
0:55:12
if uh if the person doesn't pass in the
0:55:24
did that make you what are you doing
0:55:29
i i ca so you're saying if the action is
0:55:33
something that doesn't exist
0:55:37
as a as a handler as a function
0:55:41
so um if the action's value
0:55:46
right so if the action is doggies
0:55:51
then there's no lambda for you for that
0:55:54
you're saying it's not going to be
0:55:56
and it's going to crash
0:55:59
it will be handled
0:56:05
error error handling lambda
0:56:08
and then it will display the useful
0:56:11
error to the user there there's
0:56:25
you need to create the doggy and then
0:56:28
tell me to get the dog sorry my my mind
0:56:31
is like three to three years old
0:56:36
it's fun man it's fun
0:56:40
yeah so essentially what i'm thinking
0:56:43
that the default lambda does it errors
0:56:50
errors yeah so if so would art um i kind
0:56:55
of got lost in my thought there but like
0:56:57
if you send if you send doggies as an
0:57:03
um lambda will handle is that what
0:57:06
yeah okay yeah that was that was what my
0:57:08
understanding too yeah yeah so what do
0:57:11
you mean like the the problem is like
0:57:13
handling it dynamically
0:57:18
concrete example of that
0:57:23
yeah like my doggies
0:57:27
so save for example
0:57:34
okay so we have to uh free lambdas okay
0:57:51
this is so kids can also follow along
0:57:59
a cal lambda and a doggy lambda but you
0:58:02
also have a default lambda okay right
0:58:07
say if you pass in here
0:58:13
say you want the action and then for the
0:58:16
value you want the cat
0:58:18
so because the cal lambda is already
0:58:21
present it will call the cat
0:58:24
lambda if the doggy
0:58:26
if the doggy is here um and
0:58:32
there's a dog lambda function it will it
0:58:41
okay but the tiger
0:58:44
lambda function isn't there
0:58:46
that would make it to trigger the
0:58:49
default lambda okay
0:58:53
so does that make sense that makes total
0:58:55
sense so what's what's the what is it
0:59:00
avoid with this like you said you're
0:59:02
hard coding this in the template
0:59:05
so what what's the i don't understand
0:59:07
what the issue is like what are you
0:59:08
trying to make dynamic in the template
0:59:16
do you know how here we are only calling
0:59:26
so at the moment we don't have a
0:59:29
functionality that would actually
0:59:33
call any lambda except default lambda
0:59:41
and dogs lambda as well and we are
0:59:49
this part is actually pointing to
0:59:52
default lambda it will always call d for
0:59:58
lambda what is this and um so it said
1:00:02
it's oh okay it's not a lambda
1:00:07
it's integrating the lambda in our api
1:00:12
yeah i i think i think is it more of a
1:00:15
is it more of a is it more what you're
1:00:18
talking about it's more of a template
1:00:20
issue like with the with the cloud
1:00:22
formation yes okay then yeah forget
1:00:25
about me man just move on i don't know
1:00:34
man i just wasted like 10 minutes of
1:00:36
your time you're welcome
1:00:38
you haven't you haven't
1:00:41
think the best part is that this concept
1:00:44
the more i explain it the more it
1:00:48
which is a major advantage that i've got
1:00:53
things and that's what i'm working on so
1:00:56
what you're trying to do is work with
1:00:58
the cloud formation template in such a
1:01:02
you can do it dynamically instead of
1:01:04
just hard coding out all these
1:01:09
yeah it's there right
1:01:11
so there's a way you can pat you can
1:01:14
cloud formation yaml magic
1:01:20
if there is that's still to be
1:01:23
okay okay but it must be there
1:01:27
cool that's that's interesting
1:01:33
all right wow 32 already
1:01:38
deploy it deploy try it
1:01:44
other things that i need to handle but
1:01:50
trying it in my spare
1:01:52
time if i get an empty to my
1:01:57
yeah yeah i will do that i will do 100
1:02:01
with the with the new job zane congrats
1:02:04
thanks man really appreciate it i think
1:02:09
you guys have actually helped me a lot
1:02:13
just polishing and enhancing my skill
1:02:19
um a kind of a good level but
1:02:23
i still have a long way to go man and
1:02:26
this is just the star
1:02:30
yeah well you you're doing good zane
1:02:32
like there's always so much to learn so
1:02:37
just take the yeah
1:02:42
one show at a time
1:02:46
yeah i've learned a lot by just like
1:02:48
watching you guys on the show honestly
1:02:50
like i've learned a lot about aws in
1:02:52
particular so that's been
1:02:55
that's been very helpful for me and also
1:02:57
i don't generally work anything with aws
1:03:01
right now in my like
1:03:03
in my spare time so like it's good that
1:03:06
i have this show every night
1:03:10
some things fresh you know or learn some
1:03:12
new stuff so i appreciate it
1:03:16
and we really appreciate how you bring
1:03:20
knowledge here as in the knowledge that
1:03:24
get to learn a lot from and it basically
1:03:30
building breaking and fixing things
1:03:37
man all right guys um thanks a lot for
1:03:41
um being a pleasure having you and um
1:03:45
we are this close to
1:03:48
getting this um response mess from the
1:03:51
lambda um hopefully we'll get it done in
1:03:56
uh episode um if you
1:03:59
want to see how we
1:04:01
fix it during tomorrow's
1:04:09
that's the one all right guys have a
1:04:12
good thank you have a good night