You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
@@ -71,81 +71,7 @@ Each of the following sections provide an implementation overview and detailed,
71
71
72
72
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.
73
73
74
-
### 1. Update CodeStar IAM Roles
75
-
76
-
CodeStar generates IAM Roles and Policies that control access to AWS resources. In this module, we will add permissions to Roles using IAM Managed Policies to support the customizations we will make to the CodePipeline pipeline by adding additional deployment environments and serverless unit testing.
77
-
78
-
#### 1a. Update `CodeStarWorker-uni-api-Lambda`IAM Role
79
-
80
-
1. In the AWS Management Console choose **Services** then select **IAM** under Security, Identity & Compliance.
81
-
82
-
1. Select Role in the left navigation, type `CodeStarWorker-uni-api-Lambda` in the filter text box, and click the Role name link in the Role table.
83
-
84
-

85
-
86
-
1. On the Role Summary page, click the **Attach Policy** button in the **Managed Policies** section of the **Permissions** tab.
87
-
88
-

89
-
90
-
1. Type `AWSCodePipelineCustomActionAccess` in the filter text box, select the checkbox next to the **AWSCodePipelineCustomActionAccess** Managed Policy.
91
-
92
-

93
-
94
-
1. Type `AWSCloudFormationReadOnlyAccess` in the filter text box, select the checkbox next to the **AWSCloudFormationReadOnlyAccess** Managed Policy.
95
-
96
-

97
-
98
-
1. Type `AmazonDynamoDBFullAccess` in the filter text box, select the checkbox next to the **AmazonDynamoDBFullAccess** Managed Policy, and click the **Attach Policy** button.
99
-
100
-

101
-
102
-
1. Type `AWSLambdaRole` in the filter text box, select the checkbox next to the **AWSLambdaRole** Managed Policy, and click the **Attach Policy** button.
103
-
104
-

105
-
106
-
1. The Role Summary will now include the **AWSCodePipelineCustomActionAccess**, **AWSCloudFormationReadOnlyAccess**, and **AWSLambdaRole** policies in the list of **Managed Policies**.
107
-
108
-

109
-
110
-
#### 1b. Update `CodeStarWorker-uni-api-CodePipeline` IAM Role
111
-
112
-
1. In the AWS Management Console choose **Services** then select **IAM** under Security, Identity & Compliance.
113
-
114
-
1. Select Role in the left navigation, type `CodeStarWorker-uni-api-CodePipeline` in the filter text box, and click the Role name link in the Role table.
115
-
116
-

117
-
118
-
1. On the Role Summary page, click the **Attach Policy** button in the **Managed Policies** section of the **Permissions** tab.
119
-
120
-

121
-
122
-
1. Type `AWSCodePipelineReadOnlyAccess` in the filter text box, select the checkbox next to the **AWSCodePipelineReadOnlyAccess** Managed Policy.
123
-
124
-

125
-
126
-
1. Type `AWSLambdaRole` in the filter text box, select the checkbox next to the **AWSLambdaRole** Managed Policy and click the **Attach Policy** button.
127
-
128
-

129
-
130
-
1. The Role Summary will now include the **AWSCodePipelineReadOnlyAccess** and **AWSLambdaRole** policies in the list of **Managed Policies**.
131
-
132
-

133
-
134
-
#### 1c. Update `CodeStarWorkerCodePipelineRolePolicy` IAM Policy
135
-
136
-
1. Whilst still viewing the `CodeStarWorker-uni-api-CodePipeline` IAM Role, click **Edit Policy** for the `CodeStarWorkerCodePipelineRolePolicy` in the **Inline Policies** section.
137
-
138
-

139
-
140
-
1. Update the allowed CloudFormation Resource pattern in the policy (substitute your AWS Region and AccountId) a click **Save**.
### 2. Seed the `uni-api` CodeCommit Git repository
74
+
### 1. Seed the `uni-api` CodeCommit Git repository
149
75
150
76
1. Each module has corresponding source code used to seed the CodeStar CodeCommit Git repository to support the workshop. To seed the CodeCommit Git repository, click on the **Launch Stack** button for your region below:
151
77
@@ -171,7 +97,7 @@ CodeStar generates IAM Roles and Policies that control access to AWS resources.
Now that the CodeCommit Git repository has been seeded with new source code, you will need to fetch the changes locally so that you may modify the code. Typically, this is accomplished using the `git pull` command, however for the workshop we have replaced the repository with a new history and different Git commands will be used.
177
103
@@ -180,9 +106,9 @@ Using your preferred Git client, run the commands on your local **uni-api** Git
180
106
*`git fetch --all`
181
107
*`git reset --hard origin/master`
182
108
183
-
### 4. Add Test Stage
109
+
### 3. Add Test Stage
184
110
185
-
#### 4a. Edit CodePipeline
111
+
#### 3a. Edit CodePipeline
186
112
187
113
1. In the AWS Management Console choose **Services** then select **CodeStar** under Developer Tools.
188
114
@@ -196,19 +122,19 @@ Using your preferred Git client, run the commands on your local **uni-api** Git
196
122
197
123
1. On the CodePipeline page, click **Edit**.
198
124
199
-
#### 4b. Add Test Stage
125
+
#### 3b. Add Test Stage
200
126
201
127
1. Choose **+Stage** below the Build stage of the pipeline.
#### 4c. Add GenerateChangeSet Action to Test Stage
133
+
#### 3c. Add GenerateChangeSet Action to Test Stage
208
134
209
-
1. Choose `+Action` below `Test`.
135
+
1. Choose `+ Add action group` below `Test`.
210
136
211
-
1. In the **Add action** dialog, enter `GenerateChangeSet` for the **Action name**.
137
+
1. In the **Add action group** dialog, enter `GenerateChangeSet` for the **Action name**.
212
138
213
139
1. Select `AWS CloudFormation` for the **Action provider**.
214
140
@@ -220,27 +146,27 @@ Using your preferred Git client, run the commands on your local **uni-api** Git
220
146
221
147
1. Enter `uni-api-BuildArtifact::test-template-export.yml` for **Template**
222
148
223
-
1. Select `CAPABILITY_IAM` for **Capabilities**
149
+
1. Enter `uni-api-BuildArtifact::template-configuration.json` for **Template configuration**
150
+
151
+
1. Select `CAPABILITY_NAMED_IAM` for **Capabilities**
224
152
225
153
1. Enter `CodeStarWorker-uni-api-CloudFormation` for **Role name**
226
154
227
-
1. Expand the **Advanced** section and enter `{"ProjectId":"uni-api"}` for Parameter overrides
155
+
1. Expand the **Advanced** section and enter `{"ProjectId":"uni-api", "CodeDeployRole":"arn:aws:iam::YOUR_ACCOUNT_NUMBER:role/CodeStarWorker-uni-api-CodeDeploy"}` for Parameter overrides, substituting **YOUR_ACCOUNT_NUMBER** with your AWS account number.
228
156
229
157
1. Enter `uni-api-BuildArtifact` for **Input artifacts #1**
1. Scroll to the top of the pipeline and choose `Save pipeline changes`
191
+
1. Scroll to the top of the pipeline and choose `Save`
264
192
265
-
1. Choose `Save and Continue` when prompted by the Save Pipeline Changes dialog.
193
+
1. Choose `Save` when prompted by the Save Pipeline Changes dialog.
266
194
267
195
## Test Stage Validation
268
196
@@ -312,11 +240,9 @@ The addition of the Test stage is complete. You will now validate the Test stag
312
240
313
241
#### 1c. Add GenerateChangeSet to Beta Stage
314
242
315
-
1. Choose `+Action` below `Beta`.
316
-
317
-
1. In the **Add action** dialog, select `AWS CloudFormation` for the **Action provider**.
243
+
1. Choose `+ Add action group` below `Beta`.
318
244
319
-
1.Enter`GenerateChangeSet` for the **Action name**.
245
+
1.In the **Add action** dialog, enter`GenerateChangeSet` for the **Action name**.
320
246
321
247
1. Select `AWS CloudFormation` for the **Action provider**.
322
248
@@ -328,27 +254,27 @@ The addition of the Test stage is complete. You will now validate the Test stag
328
254
329
255
1. Enter `uni-api-BuildArtifact::template-export.yml` for **Template**
330
256
331
-
1. Select `CAPABILITY_IAM` for **Capabilities**
257
+
1. Enter `uni-api-BuildArtifact::template-configuration.json` for **Template configuration**
258
+
259
+
1. Select `CAPABILITY_NAMED_IAM` for **Capabilities**
332
260
333
261
1. Enter `CodeStarWorker-uni-api-CloudFormation` for **Role name**
334
262
335
-
1. Expand the **Advanced** section and enter `{"ProjectId": "uni-api", "CustomSuffix": "-beta" }` for **Parameter overrides**
263
+
1. Expand the **Advanced** section and enter `{"ProjectId":"uni-api", "CodeDeployRole":"arn:aws:iam::YOUR_ACCOUNT_NUMBER:role/CodeStarWorker-uni-api-CodeDeploy", "CustomSuffix": "-beta" }` for **Parameter overrides**
336
264
337
265
1. Enter `uni-api-BuildArtifact` for **Input artifacts #1**
# Do not remove this statement. This command is required for AWS CodeStar projects.
25
26
# Update the AWS Partition, AWS Region, account ID and project ID in the project ARN on template-configuration.json file so AWS CloudFormation can tag project resources.
0 commit comments