Skip to content

Commit

Permalink
Merge pull request #50 from axiomhq/fix-stack-name
Browse files Browse the repository at this point in the history
fix naming consistency across stacks
  • Loading branch information
Islam Shehata authored Apr 3, 2024
2 parents 95984bc + b18b6af commit d4e3507
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- run: wget https://github.com/mikefarah/yq/releases/download/v$YQ_VERSION/yq_linux_amd64.tar.gz -O - | tar xz && mv yq_linux_amd64 /usr/local/bin/yq
- run: |-
mkdir build
yq ".Resources.LogsLambda.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./handler.py)\"" axiom-cloudwatch-lambda-cloudformation-stack.template.yaml > build/axiom-cloudwatch-lambda-cloudformation-stack.yaml
yq ".Resources.BackfillerLambda.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./backfill.py)\"" axiom-cloudwatch-backfiller-lambda-cloudformation-stack.template.yaml > build/axiom-cloudwatch-backfiller-lambda-cloudformation-stack.yaml
yq ".Resources.AxiomCloudWatchLogsSubscriber.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./logs_subscriber.py)\"" axiom-cloudwatch-logs-subscriber-cloudformation-stack.template.yaml > build/axiom-cloudwatch-logs-subscriber-cloudformation-stack.yaml
yq ".Resources.LogsLambda.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./handler.py)\"" cloudwatch-ingester-axiom-cloudformation-stack.template.yaml > build/cloudwatch-ingester-axiom-cloudformation-stack.yaml
yq ".Resources.BackfillerLambda.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./backfill.py)\"" cloudwatch-backfiller-axiom-cloudformation-stack.template.yaml > build/cloudwatch-backfiller-axiom-cloudformation-stack.yaml
yq ".Resources.AxiomCloudWatchLogsSubscriber.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./logs_subscriber.py)\"" cloudwatch-subscriber-axiom-cloudformation-stack.template.yaml > build/cloudwatch-subscriber-axiom-cloudformation-stack.yaml
- run: cat build/*
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
- run: wget https://github.com/mikefarah/yq/releases/download/v$YQ_VERSION/yq_linux_amd64.tar.gz -O - | tar xz && mv yq_linux_amd64 /usr/local/bin/yq
- run: |-
mkdir build
yq ".Resources.LogsLambda.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./handler.py)\"" axiom-cloudwatch-lambda-cloudformation-stack.template.yaml > build/axiom-cloudwatch-lambda-cloudformation-stack.yaml
yq ".Resources.BackfillerLambda.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./backfill.py)\"" axiom-cloudwatch-backfiller-lambda-cloudformation-stack.template.yaml > build/axiom-cloudwatch-backfiller-lambda-cloudformation-stack.yaml
yq ".Resources.AxiomCloudWatchLogsSubscriber.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./logs_subscriber.py)\"" axiom-cloudwatch-logs-subscriber-cloudformation-stack.template.yaml > build/axiom-cloudwatch-logs-subscriber-cloudformation-stack.yaml
yq ".Resources.LogsLambda.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./handler.py)\"" cloudwatch-ingester-axiom-cloudformation-stack.template.yaml > build/cloudwatch-ingester-axiom-cloudformation-stack.yaml
yq ".Resources.BackfillerLambda.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./backfill.py)\"" cloudwatch-backfiller-axiom-cloudformation-stack.template.yaml > build/cloudwatch-backfiller-axiom-cloudformation-stack.yaml
yq ".Resources.AxiomCloudWatchLogsSubscriber.Properties.Code.ZipFile = \"$(sed 's/\"/\\\"/g' ./logs_subscriber.py)\"" cloudwatch-subscriber-axiom-cloudformation-stack.template.yaml > build/cloudwatch-subscriber-axiom-cloudformation-stack.yaml
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Axiom CloudWatch Lambda uses the following CloudFormation stacks:
1. [Create an Axiom account](https://app.axiom.co).
2. Create a dataset in Axiom.
3. Create an API token in Axiom with permissions to ingest data to the dataset you created.
4. [Click this link to launch the Stack](https://console.aws.amazon.com/cloudformation/home?#/stacks/new?stackName=CloudWatch-Ingester-Axiom&templateURL=https://axiom-cloudformation.s3.amazonaws.com/stacks/axiom-cloudwatch-lambda-cloudformation-stack.yaml).
5. [Click this link to automatically subscribe to all existing log groups](https://console.aws.amazon.com/cloudformation/home?#/stacks/new?stackName=CloudWatch-Backfiller-Axiom&templateURL=https://axiom-cloudformation.s3.amazonaws.com/stacks/axiom-cloudwatch-backfiller-lambda-cloudformation-stack.yaml).
6. [Click this link to automatically subscribe to new log groups](https://console.aws.amazon.com/cloudformation/home?#/stacks/new?stackName=CloudWatch-Subscriber-Axiom&templateURL=https://axiom-cloudformation.s3.amazonaws.com/stacks/axiom-cloudwatch-logs-subscriber-cloudformation-stack.yaml).
4. [Click this link to launch the Stack](https://console.aws.amazon.com/cloudformation/home?#/stacks/new?stackName=cloudwatch-ingester-axiom&templateURL=https://axiom-cloudformation.s3.amazonaws.com/stacks/cloudwatch-ingester-axiom-cloudformation-stack.yaml).
5. [Click this link to automatically subscribe to all existing log groups](https://console.aws.amazon.com/cloudformation/home?#/stacks/new?stackName=cloudwatch-backfiller-axiom&templateURL=https://axiom-cloudformation.s3.amazonaws.com/stacks/cloudwatch-backfiller-axiom-cloudformation-stack.yaml).
6. [Click this link to automatically subscribe to new log groups](https://console.aws.amazon.com/cloudformation/home?#/stacks/new?stackName=cloudwatch-subscriber-axiom&templateURL=https://axiom-cloudformation.s3.amazonaws.com/stacks/cloudwatch-subscriber-axiom-cloudformation-stack.yaml).

## Logs Subscriber architecture

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Parameters:
LambdaFunctionName:
Type: String
Description: Name of the AWS Lambda Function.
Default: axiom-cloudwatch-backfiller-lambda
Default: cloudwatch-backfiller-axiom
AllowedPattern: ".+" # required
AxiomCloudWatchLambdaIngesterARN:
Type: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Parameters:
LambdaFunctionName:
Type: String
Description: Name of the AWS Lambda Function.
Default: axiom-cloudwatch-lambda
Default: cloudwatch-ingester-axiom
AllowedPattern: ".+" # required
DataTags:
Type: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Parameters:
LambdaFunctionName:
Type: String
Description: Name of the AWS Lambda Function.
Default: axiom-cloudwatch-logs-subscriber-lambda
Default: cloudwatch-subscriber-axiom
AllowedPattern: ".+" # required
AxiomCloudWatchLambdaIngesterARN:
Type: String
Expand All @@ -22,7 +22,7 @@ Resources:
Type: AWS::S3::Bucket
Properties:
AccessControl: BucketOwnerFullControl
BucketName: !Join ["-", [!Ref AWS::StackName, "axiom", "cloudtrail"]]
BucketName: !Join ["-", [!Ref AWS::StackName, "cloudtrail"]]
AxiomCloudWatchLogsSubscriberS3BucketPolicy:
Type: AWS::S3::BucketPolicy
DependsOn: AxiomCloudWatchLogsSubscriberS3Bucket
Expand Down

0 comments on commit d4e3507

Please sign in to comment.