From bf2e3e3ad35990479804e7cdda379aae050ddeb5 Mon Sep 17 00:00:00 2001 From: Luigi Di Fraia Date: Mon, 13 May 2024 08:54:40 +0100 Subject: [PATCH 1/2] chore: add missing instructions about the GitHub token --- terraform/fargate-examples/queue-processing/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/terraform/fargate-examples/queue-processing/README.md b/terraform/fargate-examples/queue-processing/README.md index 8cfbb226..6b157d97 100644 --- a/terraform/fargate-examples/queue-processing/README.md +++ b/terraform/fargate-examples/queue-processing/README.md @@ -5,6 +5,11 @@ This solution blueprint deploys an end to end data processing pipeline using ECS This blueprint expects files uploaded to an S3 source bucket which trigger S3 event notifications and publish file metadata to SQS. On a regular 2 minute CloudWatch event rule, a Lambda function is invoked which checks the SQS queue for the `ApproximateNumberOfMessages` attribute and lauches Fargate tasks based on queue depth using the ECS `run_task()` API. The tasks are designed to continue processing and draining the SQS queue before scaling down to 0 tasks automatically, eliminating the need to keep a fixed pool of ECS tasks running. * Deploy the [core-infra](../core-infra/README.md). Note if you have already deployed the infra then you can reuse it as well. +* Create a [Github token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) to access the forked repository. +* Store the secret in AWS Secrets Manager in the region where you want to deploy the blueprints. + ```shell + aws secretsmanager create-secret --name ecs-github-token --secret-string + ``` * **NOTE:** Codestar notification rules require a **one-time** creation of a service-linked role. Please verify one exists or create the codestar-notification service-linked role. * `aws iam get-role --role-name AWSServiceRoleForCodeStarNotifications` From 0e1e8d57890f195f0954f952628b8432f48214bc Mon Sep 17 00:00:00 2001 From: Luigi Di Fraia Date: Mon, 13 May 2024 08:56:02 +0100 Subject: [PATCH 2/2] chore: fix the description of 'github_token_secret_name' --- terraform/fargate-examples/backstage/variables.tf | 2 +- terraform/fargate-examples/graviton/variables.tf | 2 +- terraform/fargate-examples/queue-processing/variables.tf | 2 +- .../fargate-examples/sqs-dynamic-target-tracking/variables.tf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/terraform/fargate-examples/backstage/variables.tf b/terraform/fargate-examples/backstage/variables.tf index 6d30de8e..27b8e9ba 100644 --- a/terraform/fargate-examples/backstage/variables.tf +++ b/terraform/fargate-examples/backstage/variables.tf @@ -15,7 +15,7 @@ variable "repository_branch" { } variable "github_token_secret_name" { - description = "Name of secret manager secret storing github token for auth" + description = "Name of the AWS Secrets Manager secret storing the Github token for authentication" type = string } diff --git a/terraform/fargate-examples/graviton/variables.tf b/terraform/fargate-examples/graviton/variables.tf index 8ae9977c..f2107c34 100644 --- a/terraform/fargate-examples/graviton/variables.tf +++ b/terraform/fargate-examples/graviton/variables.tf @@ -16,7 +16,7 @@ variable "repository_branch" { } variable "github_token_secret_name" { - description = "The name of branch the Github repository, which is going to trigger a new CodePipeline excecution" + description = "Name of the AWS Secrets Manager secret storing the Github token for authentication" type = string default = "ecs-github-token" } diff --git a/terraform/fargate-examples/queue-processing/variables.tf b/terraform/fargate-examples/queue-processing/variables.tf index 8ae9977c..f2107c34 100644 --- a/terraform/fargate-examples/queue-processing/variables.tf +++ b/terraform/fargate-examples/queue-processing/variables.tf @@ -16,7 +16,7 @@ variable "repository_branch" { } variable "github_token_secret_name" { - description = "The name of branch the Github repository, which is going to trigger a new CodePipeline excecution" + description = "Name of the AWS Secrets Manager secret storing the Github token for authentication" type = string default = "ecs-github-token" } diff --git a/terraform/fargate-examples/sqs-dynamic-target-tracking/variables.tf b/terraform/fargate-examples/sqs-dynamic-target-tracking/variables.tf index 8ae9977c..f2107c34 100644 --- a/terraform/fargate-examples/sqs-dynamic-target-tracking/variables.tf +++ b/terraform/fargate-examples/sqs-dynamic-target-tracking/variables.tf @@ -16,7 +16,7 @@ variable "repository_branch" { } variable "github_token_secret_name" { - description = "The name of branch the Github repository, which is going to trigger a new CodePipeline excecution" + description = "Name of the AWS Secrets Manager secret storing the Github token for authentication" type = string default = "ecs-github-token" }