-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(aws-lambda-ssm-string-parameter): Added missing snapshot.
- Loading branch information
1 parent
fe86781
commit 61bfbaf
Showing
1 changed file
with
234 additions
and
0 deletions.
There are no files selected for viewing
234 changes: 234 additions & 0 deletions
234
...s/aws-lambda-ssmstringparameter/test/__snapshots__/lambda-ssmstringparameter.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Test minimal deployment with new Lambda function 1`] = ` | ||
Object { | ||
"Parameters": Object { | ||
"AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8ArtifactHash8D9AD644": Object { | ||
"Description": "Artifact hash for asset \\"0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8\\"", | ||
"Type": "String", | ||
}, | ||
"AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8S3Bucket9E1964CB": Object { | ||
"Description": "S3 bucket for asset \\"0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8\\"", | ||
"Type": "String", | ||
}, | ||
"AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8S3VersionKey7153CEE7": Object { | ||
"Description": "S3 key for asset version \\"0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8\\"", | ||
"Type": "String", | ||
}, | ||
}, | ||
"Resources": Object { | ||
"lambdatossmstackLambdaFunctionD5C9EDB6": Object { | ||
"DependsOn": Array [ | ||
"lambdatossmstackLambdaFunctionServiceRoleDefaultPolicyC682BFD6", | ||
"lambdatossmstackLambdaFunctionServiceRoleD0A34D48", | ||
], | ||
"Metadata": Object { | ||
"cfn_nag": Object { | ||
"rules_to_suppress": Array [ | ||
Object { | ||
"id": "W58", | ||
"reason": "Lambda functions has the required permission to write CloudWatch Logs. It uses custom policy instead of arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole with tighter permissions.", | ||
}, | ||
Object { | ||
"id": "W89", | ||
"reason": "This is not a rule for the general case, just for specific use cases/industries", | ||
}, | ||
Object { | ||
"id": "W92", | ||
"reason": "Impossible for us to define the correct concurrency for clients", | ||
}, | ||
], | ||
}, | ||
}, | ||
"Properties": Object { | ||
"Code": Object { | ||
"S3Bucket": Object { | ||
"Ref": "AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8S3Bucket9E1964CB", | ||
}, | ||
"S3Key": Object { | ||
"Fn::Join": Array [ | ||
"", | ||
Array [ | ||
Object { | ||
"Fn::Select": Array [ | ||
0, | ||
Object { | ||
"Fn::Split": Array [ | ||
"||", | ||
Object { | ||
"Ref": "AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8S3VersionKey7153CEE7", | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
Object { | ||
"Fn::Select": Array [ | ||
1, | ||
Object { | ||
"Fn::Split": Array [ | ||
"||", | ||
Object { | ||
"Ref": "AssetParameters0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8S3VersionKey7153CEE7", | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
], | ||
], | ||
}, | ||
}, | ||
"Environment": Object { | ||
"Variables": Object { | ||
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1", | ||
"SSM_STRING_PARAMETER_NAME": Object { | ||
"Ref": "lambdatossmstackstringParameterA6E27D57", | ||
}, | ||
}, | ||
}, | ||
"Handler": "index.handler", | ||
"Role": Object { | ||
"Fn::GetAtt": Array [ | ||
"lambdatossmstackLambdaFunctionServiceRoleD0A34D48", | ||
"Arn", | ||
], | ||
}, | ||
"Runtime": "nodejs14.x", | ||
"TracingConfig": Object { | ||
"Mode": "Active", | ||
}, | ||
}, | ||
"Type": "AWS::Lambda::Function", | ||
}, | ||
"lambdatossmstackLambdaFunctionServiceRoleD0A34D48": Object { | ||
"Properties": Object { | ||
"AssumeRolePolicyDocument": Object { | ||
"Statement": Array [ | ||
Object { | ||
"Action": "sts:AssumeRole", | ||
"Effect": "Allow", | ||
"Principal": Object { | ||
"Service": "lambda.amazonaws.com", | ||
}, | ||
}, | ||
], | ||
"Version": "2012-10-17", | ||
}, | ||
"Policies": Array [ | ||
Object { | ||
"PolicyDocument": Object { | ||
"Statement": Array [ | ||
Object { | ||
"Action": Array [ | ||
"logs:CreateLogGroup", | ||
"logs:CreateLogStream", | ||
"logs:PutLogEvents", | ||
], | ||
"Effect": "Allow", | ||
"Resource": Object { | ||
"Fn::Join": Array [ | ||
"", | ||
Array [ | ||
"arn:", | ||
Object { | ||
"Ref": "AWS::Partition", | ||
}, | ||
":logs:", | ||
Object { | ||
"Ref": "AWS::Region", | ||
}, | ||
":", | ||
Object { | ||
"Ref": "AWS::AccountId", | ||
}, | ||
":log-group:/aws/lambda/*", | ||
], | ||
], | ||
}, | ||
}, | ||
], | ||
"Version": "2012-10-17", | ||
}, | ||
"PolicyName": "LambdaFunctionServiceRolePolicy", | ||
}, | ||
], | ||
}, | ||
"Type": "AWS::IAM::Role", | ||
}, | ||
"lambdatossmstackLambdaFunctionServiceRoleDefaultPolicyC682BFD6": Object { | ||
"Metadata": Object { | ||
"cfn_nag": Object { | ||
"rules_to_suppress": Array [ | ||
Object { | ||
"id": "W12", | ||
"reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC.", | ||
}, | ||
], | ||
}, | ||
}, | ||
"Properties": Object { | ||
"PolicyDocument": Object { | ||
"Statement": Array [ | ||
Object { | ||
"Action": Array [ | ||
"xray:PutTraceSegments", | ||
"xray:PutTelemetryRecords", | ||
], | ||
"Effect": "Allow", | ||
"Resource": "*", | ||
}, | ||
Object { | ||
"Action": Array [ | ||
"ssm:DescribeParameters", | ||
"ssm:GetParameters", | ||
"ssm:GetParameter", | ||
"ssm:GetParameterHistory", | ||
], | ||
"Effect": "Allow", | ||
"Resource": Object { | ||
"Fn::Join": Array [ | ||
"", | ||
Array [ | ||
"arn:", | ||
Object { | ||
"Ref": "AWS::Partition", | ||
}, | ||
":ssm:", | ||
Object { | ||
"Ref": "AWS::Region", | ||
}, | ||
":", | ||
Object { | ||
"Ref": "AWS::AccountId", | ||
}, | ||
":parameter/", | ||
Object { | ||
"Ref": "lambdatossmstackstringParameterA6E27D57", | ||
}, | ||
], | ||
], | ||
}, | ||
}, | ||
], | ||
"Version": "2012-10-17", | ||
}, | ||
"PolicyName": "lambdatossmstackLambdaFunctionServiceRoleDefaultPolicyC682BFD6", | ||
"Roles": Array [ | ||
Object { | ||
"Ref": "lambdatossmstackLambdaFunctionServiceRoleD0A34D48", | ||
}, | ||
], | ||
}, | ||
"Type": "AWS::IAM::Policy", | ||
}, | ||
"lambdatossmstackstringParameterA6E27D57": Object { | ||
"Properties": Object { | ||
"Type": "String", | ||
"Value": "test-string-value", | ||
}, | ||
"Type": "AWS::SSM::Parameter", | ||
}, | ||
}, | ||
} | ||
`; |