mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
cast account to to string if necessary
This commit is contained in:
parent
d817ce08d4
commit
61b0370957
@ -56,6 +56,10 @@ class AwsCompileLayers {
|
||||
|
||||
if (layerObject.allowedAccounts) {
|
||||
layerObject.allowedAccounts.map(account => {
|
||||
// cast to string if account is number
|
||||
if(typeof account == 'number' && !isNaN(account)) {
|
||||
account = `${account}`;
|
||||
}
|
||||
const newPermission = this.cfLambdaLayerPermissionTemplate();
|
||||
newPermission.Properties.LayerVersionArn = { Ref: layerLogicalId };
|
||||
newPermission.Properties.Principal = account;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user