-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS::Lambda::Function.FileSystemConfigs missing from the Resource Specification #1598
Comments
Can you run and see if it still occurs after and provide a sample template and error message if not? |
I tried it, hmm...
The minimum template for reproduce.
Let me know if there is anything else I can do to help. |
looks like cfn-lint --info template.yaml
2020-06-21 02:19:00,585 - cfnlint - INFO - SAM Translator: 1.25.0
2020-06-21 02:19:00,585 - cfnlint - INFO - Setting AWS_DEFAULT_REGION to us-east-1
2020-06-21 02:19:00,651 - cfnlint - INFO - Transformed template:
{
"AWSTemplateFormatVersion": null,
"Description": "SAM + Lambda + EFS",
"Parameters": {
"SecurityGroupId": {
"Type": "AWS::EC2::SecurityGroup::Id"
},
"VpcSubnetId": {
"Type": "AWS::EC2::Subnet::Id"
}
},
"Resources": {
"AccessPoint": {
"Properties": {
"FileSystemId": {
"Ref": "EfsFileSystem"
}
},
"Type": "AWS::EFS::AccessPoint"
},
"EfsFileSystem": {
"Type": "AWS::EFS::FileSystem"
},
"LambdaFunctionWithEfs": {
"Properties": {
"Code": {
"ZipFile": "const fs = require('fs')\nconst path = require('path')\nconst efsMountPath = '/mnt/efs'\nexports.handler = async (event, context, callback) => {\n const directory = path.join(efsMountPath, event.body)\n const files = fs.readdirSync(directory)\n return files\n}\n"
},
"FileSystemConfigs": [
{
"Arn": {
"Fn::GetAtt": [
"AccessPoint",
"Arn"
]
},
"LocalMountPath": "/mnt/efs"
}
],
"Handler": "index.handler",
"MemorySize": 128,
"Role": {
"Fn::GetAtt": [
"LambdaFunctionWithEfsRole",
"Arn"
]
},
"Runtime": "nodejs12.x",
"Tags": [
{
"Key": "lambda:createdBy",
"Value": "SAM"
}
],
"Timeout": 3,
"VpcConfig": {
"SecurityGroupIds": [
{
"Ref": "SecurityGroupId"
}
],
"SubnetIds": [
{
"Ref": "VpcSubnetId"
}
]
}
},
"Type": "AWS::Lambda::Function"
},
"LambdaFunctionWithEfsRole": {
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": [
"sts:AssumeRole"
],
"Effect": "Allow",
"Principal": {
"Service": [
"lambda.amazonaws.com"
]
}
}
],
"Version": "2012-10-17"
},
"ManagedPolicyArns": [
"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole",
"arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole"
],
"Tags": [
{
"Key": "lambda:createdBy",
"Value": "SAM"
}
]
},
"Type": "AWS::IAM::Role"
},
"MountTarget": {
"Properties": {
"FileSystemId": {
"Ref": "EfsFileSystem"
},
"SecurityGroups": [
{
"Ref": "SecurityGroupId"
}
],
"SubnetId": {
"Ref": "VpcSubnetId"
}
},
"Type": "AWS::EFS::MountTarget"
}
}
}
2020-06-21 02:19:00,651 - cfnlint.runner - INFO - Run scan of template template.yaml
E3002 Invalid Property Resources/LambdaFunctionWithEfs/Properties/FileSystemConfigs |
Thanks for the details! Seems to be another instance of Resource Specifications lagging releases |
I got it, I'll watch the issue you led me. Thank! |
Bit me too. |
How can I work around this? My CI fails. I'd like to add an exception for this until the spec is updated. |
now in the latest Resource Specification, so this should pick it up:
|
cfn-lint version: (
cfn-lint --version
)cfn-lint 0.33.1
Description of issue.
The latest cfn-lint still detects FileSystemConfigs with AWS::Serverless::Function as an error.
The text was updated successfully, but these errors were encountered: