I am trying to deploy a lambda function through CodeDeploy. I have everything set up except my AppSpec file. Since I am deploying a Lambda and not an EC2 instance, I believe that my AppSpec file should be something like this (JSON).
{
"version": 0.0,
"Resources": [{
"myLambdaFunction": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Name": "myLambdaFunction",
"Alias": "myLambdaFunctionAlias",
"CurrentVersion": "1",
"TargetVersion": "2"
}
}
}],
"Hooks": [{
"BeforeAllowTraffic": "LambdaFunctionToValidateBeforeTrafficShift"
},
{
"AfterAllowTraffic": "LambdaFunctionToValidateAfterTrafficShift"
}
]
}
However, when I run "deploy" with this AppSpec, it fails. I am not sure where to look for the information to fill these fields. Is it on my local machine or on AWS somewhere? Or should I use different logic for CodeDeploy Lambda deployment? My end goal is to tie my GitHub mono repo through CodeDeploy and Lambda so it can be deployed across multiple instances.