Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Commit 7624527

Browse files
committed
edits part 4 122320
1 parent 0a27ae2 commit 7624527

File tree

4 files changed

+20
-29
lines changed

4 files changed

+20
-29
lines changed

docs/partner_editable/architecture.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ image::../images/architecture_diagram.png[architecture_diagram,width=100%,height
1010

1111
As shown in <<architecture_diagram>>, this Quick Start sets up a serverless AWS Cloud environment that includes the following components:
1212

13-
* Amazon API Gateway to receive Git webhook requests and forward requests to AWS Lambda.
14-
* An AWS Lambda function to process Git webhook requests and invoke AWS CodeBuild.
13+
* Amazon API Gateway to receive Git webhook requests and forward them to AWS Lambda.
14+
* An AWS Lambda function to process Git webhook requests from API Gateway and invoke an AWS CodeBuild project.
1515
* AWS Identity and Access Management (IAM) roles required by Lambda and API Gateway (not pictured).
16-
* A CodeBuild project to connect to the Git service, then retrieve, zip, and upload Git repository code to Amazon Simple Storage Service (Amazon S3).
17-
* An AWS Key Management Service (AWS KMS) private key to encrypt the SSH key used by AWS CodeBuild to connect to the Git repository using SSH (Secure Shell).
18-
* Two Amazon Simple Storage Service (S3) buckets: one for Git repository contents, and another for the AWS KMS key.
16+
* A CodeBuild project to connect to your Git service, then retrieve, zip, and upload Git repository code to Amazon Simple Storage Service (Amazon S3).
17+
* An AWS Key Management Service (AWS KMS) key to encrypt and decrypt the SSH keys used by CodeBuild to connect to your Git repository using SSH (Secure Shell).
18+
* Two Amazon Simple Storage Service (S3) buckets: one for Git repository contents, and another for encrypted SSH keys.
1919
* Two Lambda-backed AWS CloudFormation custom resources (not pictured). One generates an SSH key pair, encrypts it using AWS KMS, and uploads it to Amazon S3. The second deletes the contents of the S3 buckets when you delete the CloudFormation stack. If you need backups, ensure that you copy S3 bucket contents before deleting the stack.
2020
2121
[NOTE]
2222
========
2323
* The inline permissions attached to the IAM roles are scoped using the http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege[least privilege] model.
24-
* The CodeBuild project must be able to communicate with your Git repository. For example, you can employ a SaaS-based Git service to which CodeBuild can connect over the internet.
24+
* The CodeBuild project must be able to communicate with your Git repository. For example, you can employ a SaaS-based Git service like GitHub to which CodeBuild can connect over the internet.
2525
* The Git repository S3 bucket this Quick Start deploys has versioning enabled, and all previous versions are retained indefinitely. To modify the retention period, see http://docs.aws.amazon.com/AmazonS3/latest/user-guide/create-lifecycle.html[How do I create a lifecycle rule for an S3 bucket?].
2626
========

docs/partner_editable/deploy_steps.adoc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,28 @@
88

99
. https://fwd.aws/mDMrd[Launch the AWS CloudFormation template] into your AWS account.
1010

11-
NOTE: You are responsible for the cost of the AWS services used while running this Quick Start reference deployment. There is no additional cost for using this Quick Start. Prices are subject to change. See the pricing pages for each AWS service you will be using in this Quick Start for full details.
11+
NOTE: You are responsible for the cost of the AWS services used while running this Quick Start reference deployment. There is no additional cost for using this Quick Start. Prices are subject to change. See the pricing pages for each AWS service you use in this Quick Start for full details.
1212

13+
:xrefstyle: short
1314
[start=2]
14-
. Check the region that’s displayed in the upper-right corner of the navigation bar, and change it if necessary. This is where the network infrastructure will be built. The template is launched in the US East (Ohio) Region by default.
15+
. Check the Region that’s displayed in the upper-right corner of the navigation bar, and change it if necessary. This Region is where the Quick Start infrastructure is built. The template for this Quick Start is launched in the US East (Ohio) Region by default.
1516
. On the *Select Template* page, keep the default setting for the template URL, and then choose *Next*.
16-
. On the *Specify Details* page, change the stack name if needed. Review the parameters for the template. Provide values for the parameters that require input. For all other parameters, review the default settings and customize them as necessary. When you finish reviewing and customizing the parameters, choose *Next*.
17+
. On the *Specify Details* page, change the stack name if needed. Review the parameters for the template. Provide values for the parameters that require input. For all other parameters, review the default settings and customize them as necessary. After reviewing and customizing the parameters, choose *Next*.
1718
. On the *Options* page, you can https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html[specify tags] (key-value pairs) for resources in your stack and https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-console-add-tags.html[set advanced options]. When you’re done, choose *Next*.
18-
. On the *Review* page, review and confirm the template settings. Under *Capabilities*, select the check box to acknowledge that the template will create IAM resources.
19+
. On the *Review* page, review and confirm the template settings. Under *Capabilities*, select the check box to acknowledge that the template creates IAM resources.
1920
. Choose *Create* to deploy the stack. The stack takes approximately 15 minutes to create.
2021
. Monitor the status of the stack. When the status is *CREATE_COMPLETE*, the webhook resources are ready.
21-
. The *Outputs* tab for the stack contain the two webhook endpoint URLs, the output bucket name, and the public SSH key, as illustrated in Figure 4.
22+
. The *Outputs* tab for the stack contain the endpoint URL, the output S3 bucket name, and the public SSH key, as shown in <<outputs_tab>>.
2223

2324
NOTE: You can also https://fwd.aws/wr8Gg[download the template] to use it as a starting point for your own implementation.
2425

2526
=== Configuring Git services
2627

27-
After deploying the Quick Start, set up a webhook in the Git repository.
28+
After deploying the Quick Start, set up a webhook in your Git repository.
2829

2930
To configure a webhook, you need *GitPullWebHookApi* and *PublicSSHKey*. You can find these on the *Outputs* tab on the AWS CloudFormation console after deploying the Quick Start.
3031

31-
:xrefstyle: short
32+
3233
[#outputs_tab]
3334
.Outputs tab on the AWS CloudFormation console
3435
[link=images/outputs_tab.png]
@@ -41,7 +42,7 @@ The instructions for setting up webhooks and deployment keys vary by Git service
4142

4243
=== Configuring AWS services
4344

44-
After deploying the Quick Start, configure the AWS services in your workload to use the S3 object as a source.
45+
After deploying the Quick Start, configure the AWS services in your workload to use the Git repository S3 bucket as a source.
4546

4647
As shown in <<outputs_tab>>, the *Outputs* tab in the AWS CloudFormation console includes *OutputBucketName*. This output is an S3 key that forms the base of the path to the .zip file of your repository code. The S3 key is in the following format:
4748

@@ -50,4 +51,4 @@ S3://output-bucket-name/git-user/git-repository/git-user_git-repository.zip
5051
```
5152
Here, `git-user` is the owner or path prefix of the repository. In some Git services, this may be an organization name. However, some Git services do not return a Git user or organization for a repository. In these cases, you can omit the `git-user` parts of the path.
5253

53-
The instructions for linking an AWS service to the S3 object vary. For links to AWS service documentation, see link:#aws-services[AWS Services] later in this guide.
54+
The instructions for linking an AWS service to an S3 object vary. For links to AWS service documentation, see link:#aws-services[AWS Services] later in this guide.

docs/partner_editable/faq_troubleshooting.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
*A.* If AWS CloudFormation fails to create the stack, we recommend that you relaunch the template with *Rollback on failure* set to *Disabled*. (This setting is under *Advanced* on the *Options* page of the AWS CloudFormation console.) With this setting, the stack’s state is retained and the instance remains running so you can troubleshoot the issue.
88

9-
WARNING: When you set *Rollback on failure* to *Disabled*, you continue to incur AWS charges for this stack. Ensure that you delete the stack when after troubleshooting.
9+
WARNING: When you set *Rollback on failure* to *Disabled*, you continue to incur AWS charges for this stack. Ensure that you delete the stack after troubleshooting.
1010

1111
For additional information, see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/troubleshooting.html[Troubleshooting AWS CloudFormation^] on the AWS website.
1212

1313
== Troubleshooting
1414

15-
If your commits are not being pushed through to Amazon S3, do the following:
15+
If commits to your repository do not show up in Amazon S3, do the following:
1616

1717
* Check the security parameters and endpoint in your Git webhook configuration. See link:#configuring_git_services[Configuring Git services] earlier in this guide and consult your Git service documentation for help configuring webhooks.
1818
* Check the Lambda logs for errors. These are stored in Amazon CloudWatch Logs. For help accessing them, see https://docs.aws.amazon.com/lambda/latest/dg/monitoring-cloudwatchlogs.html[Accessing Amazon CloudWatch logs for AWS Lambda].
Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11

2-
:xrefstyle: short
3-
After deploying this Quick Start and configuring a webhook in your Git repository, when code is pushed to the repository, the Git service sends an HTTPS POST request to the link:#_webhook_endpoints[endpoint]. The POST request contains JavaScript Object Notation (JSON) data about the push operation, including the repository details, that the AWS CodeBuild project uses to fetch the latest version of your repository.
4-
5-
[#using_webhooks]
6-
.Using webhooks to code commits
7-
[link=images/using_webhooks.png]
8-
image::../images/using_webhooks.png[using_webhooks,width=647,height=266]
9-
10-
When a POST request is received, an AWS Lambda function and AWS CodeBuild project work together to retrieve, zip, and upload the Git repository to Amazon S3.
11-
12-
NOTE: The AWS CodeBuild project deployed by this Quick Start must be able to communicate with your Git repository using a Git service. For example, you can use a SaaS-based Git service that AWS CodeBuild can reach through the internet.
13-
2+
After deploying this Quick Start and configuring a webhook in your Git service, when a Git user pushes changes to your repository, the Git service sends an HTTPS POST request to the HTTPS endpoint. The endpoint is a URL the Quick Start creates that you use to link:#configuring_git_services[configure a Git webhook]. The HTTPS POST request contains JavaScript Object Notation (JSON) data about the push that invoked the webhook action. After the request is accepted by Amazon API Gateway, it is passed to an AWS Lambda function that triggers an AWS CodeBuild project. The CodeBuild project retrieves the latest version of your repository, zips it, and uploads it to an Amazon S3 bucket.
143

4+
For more information about the components that this Quick Start deploys, see the link:#architecture[Architecture] section later in this guide.

0 commit comments

Comments
 (0)