mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
Merge pull request #5787 from Kivol/dfuc-layer-option
Added layer option for deploy function update-config
This commit is contained in:
commit
6a4dc2b68e
@ -145,6 +145,14 @@ class AwsDeployFunction {
|
||||
params.Timeout = providerObj.timeout;
|
||||
}
|
||||
|
||||
if (
|
||||
'layers' in functionObj
|
||||
&& _.isArray(functionObj.layers)
|
||||
&& !_.some(functionObj.layers, _.isObject)
|
||||
) {
|
||||
params.Layers = functionObj.layers;
|
||||
}
|
||||
|
||||
if (functionObj.onError && !_.isObject(functionObj.onError)) {
|
||||
params.DeadLetterConfig = {
|
||||
TargetArn: functionObj.onError,
|
||||
|
||||
@ -231,6 +231,7 @@ describe('AwsDeployFunction', () => {
|
||||
securityGroupIds: ['1'],
|
||||
subnetIds: ['2'],
|
||||
},
|
||||
layers: ['arn:aws:lambda:us-east-1:123456789012:layer:layer:1'],
|
||||
};
|
||||
|
||||
awsDeployFunction.options = options;
|
||||
@ -262,6 +263,7 @@ describe('AwsDeployFunction', () => {
|
||||
SecurityGroupIds: ['1'],
|
||||
SubnetIds: ['2'],
|
||||
},
|
||||
Layers: ['arn:aws:lambda:us-east-1:123456789012:layer:layer:1'],
|
||||
}
|
||||
)).to.be.equal(true);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user