How does the CreateCommandsInvoker
work?
#35
-
I gather that the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The reason I ask is because I want to add some on-setup actions (populating a database), but I'm not sure how to ensure that it runs for each deployment. |
Beta Was this translation helpful? Give feedback.
-
Hi,
That means: If The same thing happens when any commands are updated, it is just a little bit more complicated: Updating the commands means updating the commands layer, which then means that the version number of the commands layer is incremented. Since the ARN of the commands layer is passed as property to If you want to implement a custom setup logic, you have essentially two options:
|
Beta Was this translation helpful? Give feedback.
Hi,
CreateCommandsFunction
is the lambda backend of an AWS Lambda-backed custom resource. In fact,CreateCommandsInvoker
is exactly the name of the custom resource which declaresCreateCommandsFunction
as its backend. You can see that by looking at theType
attribute ofCreateCommandsInvoker
intemplate.yaml
- it has the formatCustom::XXX
.That means: If
CreateCommandsInvoker
is created during stack creation, CloudFormation itself makes a request toCreateCommandsFunction
which is then responsible for setting up the commands and responding back to CloudFormation that everything went fine. A lot of this request and response logic happens in our dependency cfn-lambda.The same thing happen…