Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit a680fc2

Browse files
authored
Merge pull request #194 from aws-samples/devops-node8.10
Update the DevOps Module to Lambda runtime nodejs8.10.
2 parents c4f9446 + 7785406 commit a680fc2

File tree

14 files changed

+67
-43
lines changed

14 files changed

+67
-43
lines changed

DevOps/1_ServerlessApplicationModel/README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Below is a code snippet from the SAM template to list Unicorns:
2525
Type: 'AWS::Serverless::Function'
2626
Properties:
2727
FunctionName: 'uni-api-list'
28-
Runtime: nodejs6.10
28+
Runtime: nodejs8.10
2929
CodeUri: app
3030
Handler: list.lambda_handler
3131
Description: List Unicorns
@@ -47,7 +47,7 @@ The **FunctionName** property defines a custom name for the Lambda function. If
4747
4848
#### Runtime
4949
50-
The example API shown above is implemented in **Node.js 6.10**. Additional runtimes are available for AWS Lambda. Please refer to the [Lambda Execution Environment and Available Libraries](http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html) for the complete list.
50+
The example API shown above is implemented in **Node.js 8.10**. Additional runtimes are available for AWS Lambda. Please refer to the [Lambda Execution Environment and Available Libraries](http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html) for the complete list.
5151
5252
#### CodeUri
5353
@@ -73,19 +73,43 @@ Each of the following sections provide an implementation overview and detailed,
7373

7474
If you're using the latest version of the Chrome, Firefox, or Safari web browsers the step-by-step instructions won't be visible until you expand the section.
7575

76+
### 1. Update CodeStarWorker-uni-api-CloudFormation IAM Role
7677

77-
### 1. Seed the `uni-api` CodeCommit Git repository
78+
1. In the AWS Management Console, click Services then select IAM under Security, Identity, & Compliance.
79+
80+
1. Click the **Search IAM** search box.
81+
82+
![Search IAM](images/cloudformation-role-1.png)
83+
84+
1. Type `CodeStarWorker-uni-api-CloudFormation` in the search box and select **CodeStarWorker-uni-api-CloudFormation** in the left navigation.
85+
86+
![Search CodeStarWorker-uni-api-CloudFormation](images/cloudformation-role-2.png)
87+
88+
1. In the IAM Role Summary page, click the **Attach policies** button.
89+
90+
![Attach policies](images/cloudformation-role-3.png)
91+
92+
1. Type `AWSLambdaFullAccess` in the filter text box, select the checkbox to the left of the **AWSLambdaFullAccess** IAM Role, and click **Attach policy**.
93+
94+
![Add AWSLambdaFullAccess policy](images/cloudformation-role-4.png)
95+
96+
1. Upon returning to the IAM Role Summary page, note that the **AWSLambdaFullAccess** policy has been added to the Role.
97+
98+
![Confirm policy addition](images/cloudformation-role-5.png)
99+
100+
101+
### 2. Seed the `uni-api` CodeCommit Git repository
78102

79103
1. Each module has corresponding source code used to seed the CodeCommit Git repository for the CodeStar project. To seed the CodeCommit Git repository, click on the **Launch Stack** button for your region below:
80104

81105
Region| Launch
82106
------|-----
83-
US East (N. Virginia) | [![Launch Module 1 in us-east-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-east-1/codecommit-template.yml&param_sourceUrl=https://s3.amazonaws.com/fsd-aws-wildrydes-us-east-1/uni-api-1-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-east-1)
84-
US West (N. California) | [![Launch Module 1 in us-west-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-1#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-west-1/codecommit-template.yml&param_sourceUrl=https://s3-us-west-1.amazonaws.com/fsd-aws-wildrydes-us-west-1/uni-api-1-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-west-1)
85-
US West (Oregon) | [![Launch Module 1 in us-west-2](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-west-2/codecommit-template.yml&param_sourceUrl=https://s3-us-west-2.amazonaws.com/fsd-aws-wildrydes-us-west-2/uni-api-1-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-west-2)
86-
EU (Ireland) | [![Launch Module 1 in eu-west-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-eu-west-1/codecommit-template.yml&param_sourceUrl=https://s3-eu-west-1.amazonaws.com/fsd-aws-wildrydes-eu-west-1/uni-api-1-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=eu-west-1)
87-
EU (Frankfurt) | [![Launch Module 1 in eu-central-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-eu-central-1/codecommit-template.yml&param_sourceUrl=https://s3-eu-central-1.amazonaws.com/fsd-aws-wildrydes-eu-central-1/uni-api-1-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=eu-central-1)
88-
Asia Pacific (Sydney) | [![Launch Module 1 in ap-southeast-2](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-ap-southeast-2/codecommit-template.yml&param_sourceUrl=https://s3-ap-southeast-2.amazonaws.com/fsd-aws-wildrydes-ap-southeast-2/uni-api-1-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=ap-southeast-2)
107+
US East (N. Virginia) | [![Launch Module 1 in us-east-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-east-1/codecommit-template.yml&param_sourceUrl=https://s3.amazonaws.com/fsd-aws-wildrydes-us-east-1/uni-api-1-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-east-1)
108+
US West (N. California) | [![Launch Module 1 in us-west-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-1#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-west-1/codecommit-template.yml&param_sourceUrl=https://s3-us-west-1.amazonaws.com/fsd-aws-wildrydes-us-west-1/uni-api-1-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-west-1)
109+
US West (Oregon) | [![Launch Module 1 in us-west-2](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-west-2/codecommit-template.yml&param_sourceUrl=https://s3-us-west-2.amazonaws.com/fsd-aws-wildrydes-us-west-2/uni-api-1-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-west-2)
110+
EU (Ireland) | [![Launch Module 1 in eu-west-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-eu-west-1/codecommit-template.yml&param_sourceUrl=https://s3-eu-west-1.amazonaws.com/fsd-aws-wildrydes-eu-west-1/uni-api-1-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=eu-west-1)
111+
EU (Frankfurt) | [![Launch Module 1 in eu-central-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-eu-central-1/codecommit-template.yml&param_sourceUrl=https://s3-eu-central-1.amazonaws.com/fsd-aws-wildrydes-eu-central-1/uni-api-1-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=eu-central-1)
112+
Asia Pacific (Sydney) | [![Launch Module 1 in ap-southeast-2](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/create/review?stackName=Seed-1-ServerlessApplicationModel&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-ap-southeast-2/codecommit-template.yml&param_sourceUrl=https://s3-ap-southeast-2.amazonaws.com/fsd-aws-wildrydes-ap-southeast-2/uni-api-1-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=ap-southeast-2)
89113

90114

91115
1. The CloudFormation template has been prepopulated with the necessary fields for this module. No changes are necessary
@@ -171,7 +195,7 @@ If you're unable to install SAM CLI on your workstation, you may find it easier
171195

172196

173197
1. Once the CloudFormation stack creation has completed, find the EC2 instance public DNS name by selecting the checkbox to the left of the **DeveloperInstance** Stack, and clicking the **Outputs** tab below the list of Stacks. Find the output key labeled `PublicDnsName` and use the corresponding value in order to access the EC2 instance.
174-
198+
175199
1. Use SSH client to connect to the instance. If you are using Windows, use a client such as Putty or Bitvise (you can find instructions for connecting from Windows using Putty here: [Connecting to Your Linux Instance from Windows Using PuTTY](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html))
176200

177201
1. The Git repository has been cloned to the home directory on launch, `/home/ec2-user/uni-api`.
67.6 KB
Loading
89 KB
Loading
154 KB
Loading
82.5 KB
Loading
190 KB
Loading

DevOps/1_ServerlessApplicationModel/uni-api/template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Resources:
2323
Type: 'AWS::Serverless::Function'
2424
Properties:
2525
FunctionName: 'uni-api-list'
26-
Runtime: nodejs6.10
26+
Runtime: nodejs8.10
2727
CodeUri: app
2828
Handler: list.lambda_handler
2929
Description: List Unicorns

DevOps/2_ContinuousDeliveryPipeline/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ If you're using the latest version of the Chrome, Firefox, or Safari web browser
4545

4646
Region| Launch
4747
------|-----
48-
US East (N. Virginia) | [![Launch Module 2 in us-east-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-east-1/codecommit-template.yml&param_sourceUrl=https://s3.amazonaws.com/fsd-aws-wildrydes-us-east-1/uni-api-2-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-east-1)
49-
US West (N. California) | [![Launch Module 2 in us-west-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-1#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-west-1/codecommit-template.yml&param_sourceUrl=https://s3-us-west-1.amazonaws.com/fsd-aws-wildrydes-us-west-1/uni-api-2-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-west-1)
50-
US West (Oregon) | [![Launch Module 2 in us-west-2](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-west-2/codecommit-template.yml&param_sourceUrl=https://s3-us-west-2.amazonaws.com/fsd-aws-wildrydes-us-west-2/uni-api-2-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-west-2)
51-
EU (Ireland) | [![Launch Module 2 in eu-west-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-eu-west-1/codecommit-template.yml&param_sourceUrl=https://s3-eu-west-1.amazonaws.com/fsd-aws-wildrydes-eu-west-1/uni-api-2-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=eu-west-1)
52-
EU (Frankfurt) | [![Launch Module 2 in eu-central-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-eu-central-1/codecommit-template.yml&param_sourceUrl=https://s3-eu-central-1.amazonaws.com/fsd-aws-wildrydes-eu-central-1/uni-api-2-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=eu-central-1)
53-
Asia Pacific (Sydney) | [![Launch Module 2 in ap-southeast-2](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-ap-southeast-2/codecommit-template.yml&param_sourceUrl=https://s3-ap-southeast-2.amazonaws.com/fsd-aws-wildrydes-ap-southeast-2/uni-api-2-v3.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=ap-southeast-2)
48+
US East (N. Virginia) | [![Launch Module 2 in us-east-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-east-1/codecommit-template.yml&param_sourceUrl=https://s3.amazonaws.com/fsd-aws-wildrydes-us-east-1/uni-api-2-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-east-1)
49+
US West (N. California) | [![Launch Module 2 in us-west-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-1#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-west-1/codecommit-template.yml&param_sourceUrl=https://s3-us-west-1.amazonaws.com/fsd-aws-wildrydes-us-west-1/uni-api-2-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-west-1)
50+
US West (Oregon) | [![Launch Module 2 in us-west-2](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-us-west-2/codecommit-template.yml&param_sourceUrl=https://s3-us-west-2.amazonaws.com/fsd-aws-wildrydes-us-west-2/uni-api-2-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=us-west-2)
51+
EU (Ireland) | [![Launch Module 2 in eu-west-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-eu-west-1/codecommit-template.yml&param_sourceUrl=https://s3-eu-west-1.amazonaws.com/fsd-aws-wildrydes-eu-west-1/uni-api-2-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=eu-west-1)
52+
EU (Frankfurt) | [![Launch Module 2 in eu-central-1](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-eu-central-1/codecommit-template.yml&param_sourceUrl=https://s3-eu-central-1.amazonaws.com/fsd-aws-wildrydes-eu-central-1/uni-api-2-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=eu-central-1)
53+
Asia Pacific (Sydney) | [![Launch Module 2 in ap-southeast-2](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/images/cloudformation-launch-stack-button.png)](https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/create/review?stackName=Seed-2-ContinuousDelivery&templateURL=https://s3.amazonaws.com/fsd-aws-wildrydes-ap-southeast-2/codecommit-template.yml&param_sourceUrl=https://s3-ap-southeast-2.amazonaws.com/fsd-aws-wildrydes-ap-southeast-2/uni-api-2-v4.zip&param_targetRepositoryName=uni-api&param_targetRepositoryRegion=ap-southeast-2)
5454

5555

5656
1. The CloudFormation template has been prepopulated with the necessary fields for this module. No changes are necessary
@@ -99,7 +99,7 @@ Using a text editor, open the `template.yml` file and append a new **AWS::Server
9999

100100
1. **FunctionName** is `uni-api-update`
101101

102-
1. **Runtime** is `nodejs6.10`
102+
1. **Runtime** is `nodejs8.10`
103103

104104
1. **CodeUri** is `app`
105105

@@ -125,7 +125,7 @@ Using a text editor, open the `template.yml` file and append a new **AWS::Server
125125
Type: 'AWS::Serverless::Function'
126126
Properties:
127127
FunctionName: 'uni-api-update'
128-
Runtime: nodejs6.10
128+
Runtime: nodejs8.10
129129
CodeUri: app
130130
Handler: update.lambda_handler
131131
Description: Update Unicorn

DevOps/2_ContinuousDeliveryPipeline/uni-api/template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Resources:
3030
Type: 'AWS::Serverless::Function'
3131
Properties:
3232
FunctionName: 'uni-api-read'
33-
Runtime: nodejs6.10
33+
Runtime: nodejs8.10
3434
CodeUri: app
3535
Handler: read.lambda_handler
3636
Description: View Unicorn by name
@@ -50,7 +50,7 @@ Resources:
5050
Type: 'AWS::Serverless::Function'
5151
Properties:
5252
FunctionName: 'uni-api-list'
53-
Runtime: nodejs6.10
53+
Runtime: nodejs8.10
5454
CodeUri: app
5555
Handler: list.lambda_handler
5656
Description: List Unicorns

0 commit comments

Comments
 (0)