Skip to content

Commit

Permalink
Fix lambda test following the removal of the asset grants
Browse files Browse the repository at this point in the history
Fixes #664 (asset grants not needed)
  • Loading branch information
Elad Ben-Israel committed Oct 17, 2018
1 parent fd30bee commit 5feac95
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,91 +31,6 @@
]
}
},
"MyLambdaServiceRoleDefaultPolicy5BBC6F68": {
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucket*",
"s3:GetObject*",
"s3:List*"
],
"Resource": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":s3:::",
{
"Ref": "MyLambdaCodeS3BucketC82A5870"
}
]
]
},
{
"Fn::Join": [
"",
[
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":s3:::",
{
"Ref": "MyLambdaCodeS3BucketC82A5870"
}
]
]
},
"/",
{
"Fn::Join": [
"",
[
{
"Fn::Select": [
0,
{
"Fn::Split": [
"||",
{
"Ref": "MyLambdaCodeS3VersionKey47762537"
}
]
}
]
},
"*"
]
]
}
]
]
}
]
}
]
},
"PolicyName": "MyLambdaServiceRoleDefaultPolicy5BBC6F68",
"Roles": [
{
"Ref": "MyLambdaServiceRole4539ECB6"
}
]
}
},
"MyLambdaCCE802FB": {
"Type": "AWS::Lambda::Function",
"Properties": {
Expand Down Expand Up @@ -167,8 +82,7 @@
"Runtime": "python3.6"
},
"DependsOn": [
"MyLambdaServiceRole4539ECB6",
"MyLambdaServiceRoleDefaultPolicy5BBC6F68"
"MyLambdaServiceRole4539ECB6"
]
}
},
Expand Down
1 change: 0 additions & 1 deletion packages/@aws-cdk/aws-lambda/test/test.code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export = {
'fails if used with unsupported runtimes'(test: Test) {
test.throws(() => defineFunction(lambda.Code.inline('boom'), lambda.Runtime.Go1x), /Inline source not allowed for go1\.x/);
test.throws(() => defineFunction(lambda.Code.inline('boom'), lambda.Runtime.Java8), /Inline source not allowed for java8/);
test.throws(() => defineFunction(lambda.Code.inline('boom'), lambda.Runtime.NodeJS810), /Inline source not allowed for nodejs8\.10/);
test.done();
},
'fails if larger than 4096 bytes'(test: Test) {
Expand Down

0 comments on commit 5feac95

Please sign in to comment.