{"id":21649523,"url":"https://github.com/aws-samples/aws-appconfig-tick-extn-for-datadog","last_synced_at":"2026-05-20T04:48:36.865Z","repository":{"id":264245379,"uuid":"890457723","full_name":"aws-samples/aws-appconfig-tick-extn-for-datadog","owner":"aws-samples","description":"Sample AWS AppConfig Extension showing integration with Datadog monitors for the deployment tick event","archived":false,"fork":false,"pushed_at":"2025-01-06T10:22:24.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-25T05:24:51.607Z","etag":null,"topics":["aws","aws-appconfig","aws-cdk","aws-cdk-python","datadog","datadog-api","python","systems-manager"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-18T15:48:03.000Z","updated_at":"2025-01-06T10:22:28.000Z","dependencies_parsed_at":"2025-01-25T05:32:27.519Z","dependency_job_id":null,"html_url":"https://github.com/aws-samples/aws-appconfig-tick-extn-for-datadog","commit_stats":null,"previous_names":["aws-samples/aws-appconfig-tick-extn-for-datadog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Faws-appconfig-tick-extn-for-datadog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Faws-appconfig-tick-extn-for-datadog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Faws-appconfig-tick-extn-for-datadog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Faws-appconfig-tick-extn-for-datadog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws-samples","download_url":"https://codeload.github.com/aws-samples/aws-appconfig-tick-extn-for-datadog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244538553,"owners_count":20468734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-appconfig","aws-cdk","aws-cdk-python","datadog","datadog-api","python","systems-manager"],"created_at":"2024-11-25T07:31:58.857Z","updated_at":"2026-05-20T04:48:36.816Z","avatar_url":"https://github.com/aws-samples.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS AppConfig Deployment Tick Datadog Sample Extension\n\nThis is a sample AWS AppConfig\n[extension](https://docs.aws.amazon.com/appconfig/latest/userguide/working-with-appconfig-extensions-about.html)\nto show integrating the `AT_DEPLOYMENT_TICK` event with the Datadog API - that\nis, allowing AppConfig to check the state of a 3rd party monitor as a\ndeployment runs.\n\nThe Lambda function is invoked regularly by AWS AppConfig during a deployment\n(including the baking period at the end), and calls the Datadog API to check\nthe status of one or more monitors. If any are not in the \"OK\" state, the\nfunction tells AWS AppConfig to roll back the deployment.\n\nIf you wish to use this sample in your environments, please consider using a\ncustomer-managed KMS key with Secrets Manager, as described in [the\ndocumentation](https://docs.aws.amazon.com/secretsmanager/latest/userguide/security-encryption.html).\n\n## Prerequisites\n\nPlease see the [AWS AppConfig\ndocumentation](https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html)\nfor details on configuring the service.\n\nYou will need a Datadog account with one or more monitors configured as\nrequired to monitor your environment.\n\nEnsure you have an up-to-date Python install available, and [AWS CDK\nv2](https://docs.aws.amazon.com/cdk/v2/guide/home.html) installed.\n\nYou will need Docker installed and running for CDK to build the Lambda\nfunction.\n\n## Setting up\n\n1. Clone this repo\n2. In the cloned repo, create a Python virtual environment: `python -m venv .venv`\n3. Activate your virtual environment: `source .venv/bin/activate`\n4. Install the Python dependencies: `pip install -r requirements.txt`\n5. Ensure you have suitable AWS credentials configured in your environment\n6. If you have not bootstrapped this AWS account/region for CDK previously, run\n   `cdk bootstrap`. (It's safe to rerun if you're not sure.)\n7. Deploy this CDK app by running `cdk deploy`. You only need to deploy it once\n   per AWS Account/Region.\n8. Note the value of the `ddsecret` output from CDK as you'll need it in a\n   moment. If you miss it, you can find it again by running this command or by\n   looking at the Outputs for the `AppconfigTickExtnStack` in the\n   CloudFormation console:\n   ```bash\n   aws cloudformation describe-stacks --stack-name AppconfigTickExtnStack --query 'Stacks[0].Outputs[?OutputKey==`ddsecret`].OutputValue' --output text\n   ```\n9. In your Datadog account, create (if needed) an [API key and an\n   Application key](https://docs.datadoghq.com/account_management/api-app-keys/).\n   The application key only needs the `monitors_read`\n   [scope](https://docs.datadoghq.com/account_management/api-app-keys/#scopes),\n   so you can configure this to follow the Principle of Least Privilege.\n10. In your Datadog account, collect the Monitor Id(s) for the Monitor(s). The\n    Id is shown on the \"Properties\" screen for the monitor, and is an integer.\n11. In the AWS Console, navigate to AWS Secrets Manager (ensure you are working\n    in the same region used for deploying the CDK app).\n12. From the menu on the left, choose **Secrets**, then in the list of Secrets,\n    choose the entry with the name you noted down in step 7.\n13. Under the Overview tab, choose **Retrieve secret value**, then choose\n    **Edit**\n14. Replace the placeholder values for the API key and APP key with your keys\n    from steps 8 and 9.\n15. Replace the site placeholder with the name of your Datadog Site (for example\n    `datadoghq.com`). See the [Datadog docs](https://docs.datadoghq.com/getting_started/site/)\n    for details.\n16. Choose **Save**\n\nNOTE: You should ensure that your IAM Policies in your account prevent\nviewing/decryption of this secret by users who should not be able to access it.\n\n\n## Usage\n\n1. Navigate to the AppConfig console, then choose **Extensions**\n2. Choose the **Sample Datadog Monitor Tick** extension, then choose **Add to\n   resource**\n3. Choose the **Resource Type** to associate the Extension with, and populate\n   the following fields as required\n4. Under **Parameters**, for **MONITOR_IDS**, enter the Ids of your monitors. You\n   can enter more than one by separating the Ids with commas\n5. Choose **Create Association to Resource**\n\nYou can now deploy a configuration (under a resource to which the extension is\nattached) and your Datadog Monitors will be checked during the deployment to\nmake sure they are in the \"OK\" state.\n\nIf a monitor is not in the \"OK\" state when checked, the deployment will\nautomatically roll back.\n\nYou can find more details about the roll back by examining the event log for\nthe deployment. For example, using the AWS CLI:\n\n```bash\naws appconfig get-deployment --application-id 123abc --environment-id 456def --query '[State,EventLog]' --deployment-number 1\n```\n\n## Cleaning up\n\n1. Navigate to the AppConfig console, then choose **Extensions**\n2. Choose the **Sample Datadog Monitor Tick** extension\n3. For each entry under **Associated resources**, choose the radio button then\n   choose **Remove association**, then choose **Delete**\n4. Once you have removed all the Associated resources, you can run `cdk\n   destroy` to remove all resources created by the app\n\n## Security\n\nSee [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.\n\n## License\n\nThis sample is licensed under the MIT-0 License. See the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-samples%2Faws-appconfig-tick-extn-for-datadog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws-samples%2Faws-appconfig-tick-extn-for-datadog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-samples%2Faws-appconfig-tick-extn-for-datadog/lists"}