AWS CodePipeline Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 9: Line 9:
=Overview=
=Overview=


=Simple GitHub - Simulated Shell Build - Simulated Deployment Pipeline=
=Command Line Operations=


==Prerequisites==
{{Internal|AWS CodePipeline Command Line Operations|Command Line Operations}}


* The example requires a GitHub repository to be available. We'll use https://github.com/ovidiuf/aws-pipeline-source-example.
=Extended Examples=
* The CodeBuild and CodePipeline service roles must be created in advanced and referred from the CloudFormation stack specification by their ARN. I tried creating them as part of the same stack, but I got: "CodeBuild is not authorized to perform: sts:AssumeRole on ...". If they exist when the stack creation is attempted, it works. <Font color=darkgray>TODO: try to declare them in the same stack, experiment with dependencies, try to make this work.</font>


==Procedure==
* <span id='Simple_GitHub_-_Simulated_Shell_Build_-_Simulated_Deployment_Pipeline'></span>[[Simple GitHub Simulated Shell Build Simulated Deployment AWS CodePipeline Pipeline|thalarion - Simple GitHub - Simulated Shell Build - Simulated Deployment Pipeline]]
* <span id='Invoking_Lambda_from_CodePipeline_Pipeline'></span>[[Invoking Lambda from CodePipeline Pipeline]]


The CodePipeline pipeline, the delegate CodeBuild project, required service roles and the S3 bucket to keep the artifacts produced by the pipeline will be created as part of one CodeFormation stack:
=Troubleshooting and Debugging=


<syntaxhighlight lang='yaml'>
<font color=darkgray>If creating a resource that allows for a "Description", like an API Gateway API, you can use that to render various configuration parameters to be debugged:
</syntaxhighlight>
 
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
  OpenApiAwsFile:
      Type: String
Resources:
  Api:
    Type: AWS::ApiGateway::RestApi
    Properties:
      Name: test
      Description: !Sub 'This way we can render parameters ${OpenApiAwsFile}'
  ...
 
</font>

Latest revision as of 18:48, 19 March 2019

External

Internal

Overview

Command Line Operations

Command Line Operations

Extended Examples

Troubleshooting and Debugging

If creating a resource that allows for a "Description", like an API Gateway API, you can use that to render various configuration parameters to be debugged:

AWSTemplateFormatVersion: '2010-09-09'
Parameters:
  OpenApiAwsFile:
     Type: String
Resources:
  Api:
    Type: AWS::ApiGateway::RestApi
    Properties:
      Name: test
      Description: !Sub 'This way we can render parameters ${OpenApiAwsFile}'
  ...