-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce AutoPublishCodeSha256 to allow overriding the publish versi…
…on resource identifier
- Loading branch information
Showing
8 changed files
with
168 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
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
11 changes: 11 additions & 0 deletions
11
tests/translator/input/function_with_alias_and_code_sha256.yaml
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,11 @@ | ||
Resources: | ||
MinimalFunction: | ||
Type: 'AWS::Serverless::Function' | ||
Properties: | ||
CodeUri: s3://sam-demo-bucket/hello.zip | ||
Handler: hello.handler | ||
Runtime: python2.7 | ||
AutoPublishAlias: live | ||
AutoPublishCodeSha256: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b | ||
VersionDescription: sam-testing | ||
|
82 changes: 82 additions & 0 deletions
82
tests/translator/output/function_with_alias_and_code_sha256.json
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,82 @@ | ||
{ | ||
"Resources": { | ||
"MinimalFunctionVersion6b86b273ff": { | ||
"DeletionPolicy": "Retain", | ||
"Type": "AWS::Lambda::Version", | ||
"Properties": { | ||
"Description": "sam-testing", | ||
"FunctionName": { | ||
"Ref": "MinimalFunction" | ||
} | ||
} | ||
}, | ||
"MinimalFunctionAliaslive": { | ||
"Type": "AWS::Lambda::Alias", | ||
"Properties": { | ||
"FunctionVersion": { | ||
"Fn::GetAtt": [ | ||
"MinimalFunctionVersion6b86b273ff", | ||
"Version" | ||
] | ||
}, | ||
"FunctionName": { | ||
"Ref": "MinimalFunction" | ||
}, | ||
"Name": "live" | ||
} | ||
}, | ||
"MinimalFunction": { | ||
"Type": "AWS::Lambda::Function", | ||
"Properties": { | ||
"Code": { | ||
"S3Bucket": "sam-demo-bucket", | ||
"S3Key": "hello.zip" | ||
}, | ||
"Handler": "hello.handler", | ||
"Role": { | ||
"Fn::GetAtt": [ | ||
"MinimalFunctionRole", | ||
"Arn" | ||
] | ||
}, | ||
"Runtime": "python2.7", | ||
"Tags": [ | ||
{ | ||
"Value": "SAM", | ||
"Key": "lambda:createdBy" | ||
} | ||
] | ||
} | ||
}, | ||
"MinimalFunctionRole": { | ||
"Type": "AWS::IAM::Role", | ||
"Properties": { | ||
"ManagedPolicyArns": [ | ||
"arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" | ||
], | ||
"Tags": [ | ||
{ | ||
"Value": "SAM", | ||
"Key": "lambda:createdBy" | ||
} | ||
], | ||
"AssumeRolePolicyDocument": { | ||
"Version": "2012-10-17", | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"sts:AssumeRole" | ||
], | ||
"Effect": "Allow", | ||
"Principal": { | ||
"Service": [ | ||
"lambda.amazonaws.com" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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