Skip to content

Commit 0f1a082

Browse files
authored
chore: merge pull request #1000 from awslabs/release/v1.12.0
merge Release/v1.12.0 into master
2 parents f6a3c51 + e76b939 commit 0f1a082

File tree

237 files changed

+11560
-4891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+11560
-4891
lines changed

DEVELOPMENT_GUIDE.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Install snakeviz `pip install snakeviz`
8080

8181
.. code-block:: shell
8282
83-
python -m cProfile -o sam_profile_results bin/sam-translate.py translate --input-file=tests/translator/input/alexa_skill.yaml --output-file=cfn-template.json
83+
python -m cProfile -o sam_profile_results bin/sam-translate.py translate --template-file=tests/translator/input/alexa_skill.yaml --output-template=cfn-template.json
8484
snakeviz sam_profile_results
8585
8686
Verifying transforms
@@ -96,7 +96,7 @@ If you make changes to the transformer and want to verify the resulting CloudFor
9696
9797
# Transform your SAM template into a CloudFormation template
9898
# Replace "output-template.yaml" if you didn't run the package command above or specified a different path for --output-template-file
99-
bin/sam-translate.py --input-file=output-template.yaml
99+
bin/sam-translate.py --template-file=output-template.yaml
100100
101101
# Deploy your transformed CloudFormation template
102102
# Replace MY_STACK_NAME with a unique name each time you deploy

docs/cloudformation_compatibility.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ AWS::Serverless::Application
182182
================================== ======================== ========================
183183
Location None SAM expects exact values for the Location property
184184
Parameters All
185-
NotificationArns All
185+
NotificationARNs All
186186
Tags All
187187
TimeoutInMinutes All
188188
================================== ======================== ========================

docs/globals.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Currently, the following resources and properties are being supported:
7373
Api:
7474
# Properties of AWS::Serverless::Api
7575
# Also works with Implicit APIs
76+
Auth:
7677
Name:
7778
DefinitionUri:
7879
CacheClusterEnabled:
@@ -90,7 +91,7 @@ Currently, the following resources and properties are being supported:
9091
9192
SimpleTable:
9293
# Properties of AWS::Serverless::SimpleTable
93-
SSESpecification
94+
SSESpecification:
9495
9596
Implicit APIs
9697
~~~~~~~~~~~~~

docs/internals/generated_resources.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CloudFormation Resources Generated By SAM
55
:local:
66
:backlinks: none
77

8-
When you create a Serverless Function or a Serverlesss API, SAM will create additional AWS resources wire everything up.
8+
When you create a Serverless Function or a Serverlesss API, SAM will create additional AWS resources to wire everything up.
99
For example, when you create a ``AWS::Serverless::Function``, SAM will create a Lambda Function resource
1010
along with an IAM Role resource to give appropriate permissions for your function. This document describes all
1111
such generated resources, how they are named, and how to refer to them in your SAM template.

docs/safe_lambda_deployments.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ They work as follows:
223223
- **AllAtOnce**: This is an instant shifting of 100% of traffic to new version. This is useful if you want to run
224224
run pre/post hooks but don't want a gradual deployment. If you have a pipeline, you can set Beta/Gamma stages to
225225
deploy instantly because the speed of deployments matter more than safety here.
226-
226+
- **Custom**: Aside from Above mentioned Configurations, Custom Codedeploy configuration are also supported.
227+
(Example. Type: CustomCodeDeployConfiguration)
227228

228229
PreTraffic & PostTraffic Hooks
229230
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

docs/website/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CommonMark==0.5.4
66
docutils==0.14
77
idna==2.6
88
imagesize==0.7.1
9-
Jinja2==2.10
9+
Jinja2>=2.10.1
1010
MarkupSafe==1.0
1111
Pygments==2.2.0
1212
pytz==2017.3
Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,44 @@
1+
// @ts-check
12
'use strict';
23

34
const aws = require('aws-sdk');
45
const codedeploy = new aws.CodeDeploy({apiVersion: '2014-10-06'});
56

6-
exports.handler = (event, context, callback) => {
7+
exports.handler = async (event, context, callback) => {
78

8-
console.log("Entering PreTraffic Hook!");
9-
console.log(JSON.stringify(event));
10-
11-
//Read the DeploymentId from the event payload.
12-
var deploymentId = event.DeploymentId;
13-
console.log(deploymentId);
9+
console.log("Entering PreTraffic Hook!");
10+
console.log(JSON.stringify(event));
11+
12+
//Read the DeploymentId from the event payload.
13+
let deploymentId = event.DeploymentId;
14+
console.log("deploymentId=" + deploymentId);
1415

1516
//Read the LifecycleEventHookExecutionId from the event payload
16-
var lifecycleEventHookExecutionId = event.LifecycleEventHookExecutionId;
17-
console.log(lifecycleEventHookExecutionId);
18-
19-
/*
20-
[Perform validation or prewarming steps here]
21-
*/
22-
23-
// Prepare the validation test results with the deploymentId and
17+
let lifecycleEventHookExecutionId = event.LifecycleEventHookExecutionId;
18+
console.log("lifecycleEventHookExecutionId=" + lifecycleEventHookExecutionId);
19+
20+
/*
21+
[Perform validation or prewarming steps here]
22+
*/
23+
24+
// Prepare the validation test results with the deploymentId and
2425
// the lifecycleEventHookExecutionId for AWS CodeDeploy.
25-
var params = {
26+
let params = {
2627
deploymentId: deploymentId,
2728
lifecycleEventHookExecutionId: lifecycleEventHookExecutionId,
2829
status: 'Succeeded' // status can be 'Succeeded' or 'Failed'
2930
};
30-
31-
// Pass AWS CodeDeploy the prepared validation test results.
32-
codedeploy.putLifecycleEventHookExecutionStatus(params, function(err, data) {
33-
if (err) {
34-
// Validation failed.
35-
console.log('Validation test failed');
36-
console.log(err);
37-
console.log(data);
38-
callback('Validation test failed');
39-
} else {
40-
// Validation succeeded.
41-
console.log('Validation test succeeded');
42-
callback(null, 'Validation test succeeded');
43-
}
44-
});
31+
32+
try {
33+
await codedeploy.putLifecycleEventHookExecutionStatus(params).promise();
34+
console.log("putLifecycleEventHookExecutionStatus done. executionStatus=[" + params.status + "]");
35+
return 'Validation test succeeded'
36+
}
37+
catch (err) {
38+
console.log("putLifecycleEventHookExecutionStatus ERROR: " + err);
39+
throw new Error('Validation test failed')
40+
}
41+
4542
}
4643

47-
// See more: https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#reference-appspec-file-structure-hooks-section-structure-lambda-sample-function
44+
// See more: https://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#reference-appspec-file-structure-hooks-section-structure-lambda-sample-function
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
'use strict';
22

33

4-
exports.handler = (event, context, callback) => {
4+
exports.handler = async (event, context, callback) => {
5+
56
console.log("Function loaded! " + context.functionName + ":" + context.functionVersion);
67

78
callback(null, "Success");
8-
}
9+
}

examples/2016-10-31/lambda_safe_deployments/template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Resources:
99
Properties:
1010
Handler: safeTest.handler
1111
CodeUri: src/
12-
Runtime: nodejs6.10
12+
Runtime: nodejs8.10
1313
AutoPublishAlias: live
1414
DeploymentPreference:
1515
Type: Linear10PercentEvery1Minute
@@ -35,10 +35,10 @@ Resources:
3535
Action:
3636
- "lambda:InvokeFunction"
3737
Resource: !Ref safeTest.Version
38-
Runtime: nodejs6.10
38+
Runtime: nodejs8.10
3939
FunctionName: 'CodeDeployHook_preTrafficHook'
4040
DeploymentPreference:
4141
Enabled: false
4242
Environment:
4343
Variables:
44-
CurrentVersion: !Ref safeTest.Version
44+
CurrentVersion: !Ref safeTest.Version

examples/2016-10-31/policy_templates/all_policy_templates.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,6 @@ Resources:
8787

8888
- FilterLogEventsPolicy:
8989
LogGroupName: name
90+
91+
- StepFunctionsExecutionPolicy:
92+
StateMachineName: name

0 commit comments

Comments
 (0)