The lambda function code(zip file) is currently being got from my S3 bucket. However, after I change my code and replace the original zip file with updated code and then run update-stack, the lambda function code seems not change in the lambda console.
Is there any way to make it work?
My json template
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"storageS3Bucket": {
"Type": "String",
"Default": "myBucket"
}
},
"Resources": {
"s3BucketImageStorage":{
"Type" : "AWS::S3::Bucket",
"Properties" : {
"BucketName" : {
"Ref": "storageS3Bucket"
}
}
},
"getBannerHandler": {
"Type": "AWS::Lambda::Function",
"Properties": {
"FunctionName": "getBanner",
"Handler": "getBanner.handler",
"Role": {
"Fn::ImportValue": {
"Fn::Sub": "${RolesStack}-LambdaRoleArn"
}
},
"Code": {
"S3Bucket": {
"Ref": "HandlerCodeS3Bucket"
},
"S3Key":"getBanner.zip"
},
"Runtime": "nodejs12.x"
}
}
}
}