├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .github ├── dependabot.yml └── workflows │ ├── ci.yml │ └── python.yml ├── .gitignore ├── .gitpod.yml ├── LICENSE ├── Makefile ├── Pipfile ├── Pipfile.lock ├── README.md ├── docs ├── alb.md ├── alexa-skills-kit.md ├── alexa-smart-home.md ├── amazon-msk.md ├── apache-kafka.md ├── appsync-authorizer.md ├── appsync-resolver.md ├── build-project.md ├── cloudformation.md ├── cloudfront-function.md ├── cloudfront-lambda-edge.md ├── cloudwatch-logs.md ├── code-commit.md ├── code-pipeline-job.md ├── cognito-events.md ├── cognito-user-pool.md ├── config.md ├── connect.md ├── dynamodb.md ├── event-bridge.md ├── events │ ├── alb │ │ └── alb.json │ ├── alexa-skills-kit │ │ ├── end-session.json │ │ ├── intent-answer.json │ │ ├── intent-getnewfact.json │ │ ├── intent-mycoloris.json │ │ ├── intent-recipe.json │ │ └── start-session.json │ ├── alexa │ │ ├── alex-smart-home-skill-v1.json │ │ └── alex-smart-home-skill-v3.json │ ├── amazon-config │ │ └── amazon-config.json │ ├── amazon-connect │ │ └── amazon-connect.json │ ├── amazon-mq │ │ ├── active-mq.json │ │ └── rabbit-mq.json │ ├── amazon-msk │ │ ├── amazon-msk-1.json │ │ └── amazon-msk-2.json │ ├── apache-kafka │ │ └── apache-kafka.json │ ├── api-gateway │ │ ├── api-gateway-authorizer-format-1.json │ │ ├── api-gateway-authorizer-format-2.json │ │ ├── http-api-format-1.json │ │ └── http-api-format-2.json │ ├── appsync │ │ ├── amplify-graphql-directive.json │ │ ├── appsync-authorizer.json │ │ └── appsync-direct-resolver.json │ ├── cloudformation │ │ ├── cloudformation-create.json │ │ ├── cloudformation-delete.json │ │ └── cloudformation-update.json │ ├── cloudfront-lambda-edge │ │ ├── origin-request.json │ │ └── viewer-request.json │ ├── cloudwatch-events │ │ ├── amazon-augmented-ai.json │ │ ├── amazon-chime-voice-connector-streaming-ends.json │ │ ├── amazon-chime-voice-connector-streaming-fails.json │ │ ├── amazon-chime-voice-connector-streaming-starts.json │ │ ├── amazon-chime-voice-connector-streaming-updates.json │ │ ├── amazon-cloudwatch-anomaly-detection-alarm.json │ │ ├── amazon-cloudwatch-schuduled-event.json │ │ ├── amazon-cloudwatch-single-metric-alarm.json │ │ ├── amazon-ec2-autoscale-instance-launch-lifecycle-action.json │ │ ├── amazon-ec2-autoscale-instance-launch-successful.json │ │ ├── amazon-ec2-autoscale-instance-launch-unsuccessful.json │ │ ├── amazon-ec2-ebs-create-volume.json │ │ ├── amazon-ec2-ebs-delete-volume.json │ │ ├── amazon-ec2-state-change.json │ │ ├── amazon-ecr-completed-image-delection.json │ │ ├── amazon-ecr-completed-image-scan-basic.json │ │ ├── amazon-ecr-completed-image-scan-enhanced.json │ │ ├── amazon-ecr-completed-push.json │ │ ├── amazon-s3.json │ │ ├── amazon-workspaces.json │ │ ├── application-auto-scaling-scaled-to-max.json │ │ ├── aws-batch-job-state-change.json │ │ ├── aws-codebuild-phase-change.json │ │ ├── aws-codebuild-state-change.json │ │ ├── aws-codecommit-approvalRuleTemplateAssociatedWithRepository.json │ │ ├── aws-codecommit-approvalRuleTemplateBatchAssociatedWithRepositories.json │ │ ├── aws-codecommit-approvalRuleTemplateBatchDisassociatedFromRepositories.json │ │ ├── aws-codecommit-approvalRuleTemplateCreated.json │ │ ├── aws-codecommit-approvalRuleTemplateDeleted.json │ │ ├── aws-codecommit-approvalRuleTemplateDisassociatedWithRepository.json │ │ ├── aws-codecommit-approvalRuleTemplateUpdated.json │ │ ├── aws-codecommit-commentOnCommitCreated.json │ │ ├── aws-codecommit-commentOnCommitUpdated.json │ │ ├── aws-codecommit-commentOnPullRequestCreated.json │ │ ├── aws-codecommit-commentOnPullRequestUpdated.json │ │ ├── aws-codecommit-pullRequestApprovalRuleCreated.json │ │ ├── aws-codecommit-pullRequestApprovalRuleDeleted.json │ │ ├── aws-codecommit-pullRequestApprovalRuleOverridden.json │ │ ├── aws-codecommit-pullRequestApprovalRuleUpdated.json │ │ ├── aws-codecommit-pullRequestApprovalStateChanged.json │ │ ├── aws-codecommit-pullRequestCreated.json │ │ ├── aws-codecommit-pullRequestMergeStatusUpdated.json │ │ ├── aws-codecommit-pullRequestSourceBranchUpdated.json │ │ ├── aws-codecommit-pullRequestStatusChanged.json │ │ ├── aws-codecommit-reactionCreated.json │ │ ├── aws-codecommit-reactionUpdated.json │ │ ├── aws-codecommit-referenceCreated.json │ │ ├── aws-codecommit-referenceDeleted.json │ │ ├── aws-codecommit-referenceUpdated.json │ │ ├── aws-codecommit-unreferencedMergeCommitCreated.json │ │ ├── aws-codedeploy-deployment-state-change.json │ │ ├── aws-codedeploy-instance-state-change.json │ │ ├── aws-codepipeline-execution-state-change.json │ │ ├── aws-codepipeline-stage-action-execution-state-change.json │ │ ├── aws-codepipeline-stage-execution-state-change.json │ │ ├── aws-config.json │ │ ├── aws-step-function-execution-aborted.json │ │ ├── aws-step-function-execution-failed.json │ │ ├── aws-step-function-execution-started.json │ │ ├── aws-step-function-execution-suceeded.json │ │ ├── aws-step-function-execution-timed-out.json │ │ ├── aws-trusted-advisor-exposed-access-key.json │ │ ├── aws-trusted-advisor-load-balancer-optimization.json │ │ ├── aws-trusted-advisor-low-utilization-amazon-ec2-instances.json │ │ └── tag-change.json │ ├── cloudwatch-logs │ │ └── cloudwatch-logs.json │ ├── code-commit │ │ └── code-commit.json │ ├── code-pipeline-job │ │ └── code-pipeline-job.json │ ├── cognito-events │ │ └── cognito-event.json │ ├── cognito-user-pool │ │ ├── create-auth-challenge.json │ │ ├── custom-email-sender.json │ │ ├── custom-message.json │ │ ├── define-auth-challenge.json │ │ ├── post-authentication.json │ │ ├── post-confirmation.json │ │ ├── pre-authentication.json │ │ ├── pre-signup.json │ │ ├── pre-token-generation.json │ │ ├── user-migration.json │ │ └── verify-auth-challenge-response.json │ ├── dynamodb │ │ └── dynamodb.json │ ├── kinesis-firehose │ │ ├── kinesis-firehose-cloudwatch-logs-processor.json │ │ └── kinesis-firehose-message.json │ ├── kinesis-streams │ │ └── kinesis-streams.json │ ├── lex-v2 │ │ ├── banking-bot.json │ │ ├── book-car.json │ │ └── book-hotel.json │ ├── lex │ │ ├── book-car.json │ │ ├── book-hotel.json │ │ ├── make-appointment.json │ │ └── order-flowers.json │ ├── s3-batch │ │ └── s3-batch.json │ ├── s3-object-lambda │ │ ├── s3-object-lambda-iam-user.json │ │ └── s3-object-lambda-temp-credentials.json │ ├── s3 │ │ ├── s3-delete.json │ │ └── s3-put.json │ ├── secret-manager │ │ └── secret-manager-create.json │ ├── ses │ │ └── ses.json │ ├── sns │ │ └── sns-message.json │ ├── sqs │ │ ├── sqs-fifo-queue.json │ │ └── sqs-standard-queue.json │ └── work-mail │ │ └── work-mail.json ├── function-url.md ├── http-api-custom-authorizer.md ├── http-api.md ├── index.md ├── iot-events.md ├── iot.md ├── kinesis-firehose.md ├── kinesis-streams.md ├── lambda-context.md ├── lambda-invoke-types.md ├── lambda-lifecycle.md ├── lambda-resources.md ├── lambda-security.md ├── lex-v2.md ├── lex.md ├── media │ ├── aws-lambda-1.svg │ ├── aws-logo-light.svg │ ├── aws-ses-example-dark.png │ ├── aws-ses-example-light.png │ ├── cloudfront-function-dark.png │ ├── cloudfront-function-light.png │ ├── cloudfront-lambda-edge-dark.png │ ├── cloudfront-lambda-edge-light.png │ ├── invoke-type-dark.png │ ├── invoke-type-light.png │ ├── overview-lnvoke-dark.png │ ├── overview-lnvoke-light.png │ └── overview-lnvoke-with-error-light.png ├── mq.md ├── rest-api-custom-authorizer.md ├── rest-api.md ├── s3-batch.md ├── s3-object-lambda.md ├── s3.md ├── secrets-manager.md ├── ses.md ├── sns.md ├── sqs.md └── work-mail.md ├── event-schema ├── .flake8 ├── .gitignore ├── MANIFEST.in ├── Makefile ├── README.md ├── aws_lambda_publish_shared_event │ ├── __init__.py │ ├── __main__.py │ ├── generate_test_event │ │ ├── __init__.py │ │ └── __main__.py │ └── util.py ├── generate-test-event ├── mypy.ini ├── poetry.lock ├── publish-shared-event ├── pyproject.toml ├── setup.py └── tests │ ├── __init__.py │ ├── test.json │ ├── test_generate_test_event.py │ └── test_main.py └── mkdocs.yml /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3/.devcontainer/base.Dockerfile 2 | 3 | # [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster 4 | ARG VARIANT="3.10-bullseye" 5 | FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} 6 | 7 | # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 8 | ARG NODE_VERSION="none" 9 | RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi 10 | 11 | # [Optional] If your pip requirements rarely change, uncomment this section to add them to the image. 12 | # COPY requirements.txt /tmp/pip-tmp/ 13 | # RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \ 14 | # && rm -rf /tmp/pip-tmp 15 | 16 | # [Optional] Uncomment this section to install additional OS packages. 17 | # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 18 | # && apt-get -y install --no-install-recommends 19 | 20 | # [Optional] Uncomment this line to install global node packages. 21 | # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "settings": { 3 | "python.defaultInterpreterPath": "/usr/local/bin/python", 4 | "python.linting.enabled": true, 5 | "python.linting.pylintEnabled": true, 6 | "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", 7 | "python.formatting.blackPath": "/usr/local/py-utils/bin/black", 8 | "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", 9 | "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", 10 | "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", 11 | "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", 12 | "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", 13 | "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", 14 | "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", 15 | "git.enableCommitSigning": true 16 | }, 17 | "build": { 18 | "dockerfile": "Dockerfile", 19 | "context": "..", 20 | "args": { 21 | "VARIANT": "3.10-bullseye", 22 | "NODE_VERSION": "lts/*" 23 | } 24 | }, 25 | "customizations": { 26 | "vscode": { 27 | "extensions": [ 28 | "ms-python.python", 29 | "ms-python.vscode-pylance", 30 | "ms-vscode.makefile-tools" 31 | ] 32 | } 33 | }, 34 | "remoteUser": "vscode" 35 | } -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | commit-message: 9 | prefix: chore 10 | include: scope 11 | 12 | - package-ecosystem: "pip" 13 | directory: "/event-schema" 14 | schedule: 15 | interval: "daily" 16 | target-branch: "develop" 17 | commit-message: 18 | prefix: chore 19 | include: scope 20 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | on: 3 | push: 4 | branches: 5 | - main 6 | - develop 7 | paths: 8 | - '.github/workflows/ci.yml' 9 | - 'docs/*' 10 | - 'mkdocs.yml' 11 | - 'Makefile' 12 | - 'Pipfile.lock' 13 | 14 | jobs: 15 | deploy: 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - uses: actions/checkout@v4 20 | 21 | - name: Set up Python 3.10 22 | uses: actions/setup-python@v5 23 | with: 24 | python-version: "3.10" 25 | 26 | - name: Install mkdocs dependencies 27 | run: make dev 28 | 29 | - name: Deploy to github pages 30 | run: make deploy 31 | -------------------------------------------------------------------------------- /.github/workflows/python.yml: -------------------------------------------------------------------------------- 1 | name: aws-lambda-publish-shared-event 2 | on: 3 | push: 4 | branches: 5 | - main 6 | - develop 7 | paths: 8 | - '.github/workflows/python.yml' 9 | - 'event-schema/*' 10 | - 'docs/events/*' 11 | pull_request: 12 | branches: 13 | - main 14 | 15 | jobs: 16 | build: 17 | runs-on: ubuntu-latest 18 | strategy: 19 | max-parallel: 4 20 | matrix: 21 | python-version: ["3.8", "3.9", "3.10", "3.11"] 22 | env: 23 | OS: ${{ matrix.os }} 24 | PYTHON: ${{ matrix.python-version }} 25 | 26 | steps: 27 | - uses: actions/checkout@v4 28 | 29 | - name: Set up Python ${{ matrix.python-version }} 30 | uses: actions/setup-python@v5 31 | with: 32 | python-version: ${{ matrix.python-version }} 33 | 34 | - name: Install tools 35 | run: pip3 install -U wheel pip poetry 36 | 37 | - name: Install dependencies 38 | working-directory: event-schema 39 | run: make dev 40 | 41 | - name: Formatting and Linting 42 | working-directory: event-schema 43 | run: make lint 44 | 45 | - name: Static type checking 46 | working-directory: event-schema 47 | run: make mypy 48 | 49 | - name: Run test suite 50 | working-directory: event-schema 51 | run: make test 52 | 53 | - name: Upload coverage to Codecov 54 | uses: codecov/codecov-action@v4 55 | with: 56 | file: ./event-schema/coverage.xml 57 | token: ${{ secrets.CODECOV_TOKEN }} 58 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | site/ 3 | .DS_Store 4 | .idea/ -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | tasks: 2 | - init: make 3 | 4 | vscode: 5 | extensions: 6 | - ms-vscode.makefile-tools 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Michael Brewer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | dev: 2 | pip3 install -U pipenv 3 | pipenv install 4 | 5 | serve: 6 | pipenv run mkdocs serve 7 | 8 | build: 9 | pipenv run mkdocs build 10 | 11 | deploy: 12 | pipenv run mkdocs gh-deploy --force 13 | 14 | clean: 15 | rm -Rf site/ 16 | pipenv --rm 17 | 18 | pr: build 19 | 20 | update: 21 | pipenv update 22 | -------------------------------------------------------------------------------- /Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | url = "https://pypi.org/simple" 3 | verify_ssl = true 4 | name = "pypi" 5 | 6 | [packages] 7 | mkdocs-material = "*" 8 | mkdocs-git-revision-date-plugin = "*" 9 | 10 | [dev-packages] 11 | 12 | [requires] 13 | python_version = "3.10" 14 | -------------------------------------------------------------------------------- /docs/alexa-skills-kit.md: -------------------------------------------------------------------------------- 1 | # Alexa Skills 2 | 3 | Event-driven, synchronous invocation 4 | 5 | ## Request 6 | 7 | ## Generating sameple events 8 | 9 | ```shell 10 | sam local generate-event alexa-skills-kit end-session 11 | sam local generate-event alexa-skills-kit intent-answer 12 | sam local generate-event alexa-skills-kit intent-getnewfact 13 | sam local generate-event alexa-skills-kit intent-mycoloris 14 | sam local generate-event alexa-skills-kit intent-recipe 15 | sam local generate-event alexa-skills-kit start-session 16 | ``` 17 | 18 | ## Event Example 19 | 20 | ```json title="Amazon Alexa Intent Recipe Event" 21 | --8<-- "docs/events/alexa-skills-kit/intent-recipe.json" 22 | ``` 23 | 24 | ## Response 25 | 26 | ## Resources 27 | 28 | Language SDK 29 | 30 | - [Python SDK](https://github.com/alexa/alexa-skills-kit-sdk-for-python) 31 | - [NodeJS SDK](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs) 32 | - [Java SDK](https://github.com/alexa/alexa-skills-kit-sdk-for-java) 33 | 34 | Sample projects 35 | 36 | - [Python - skill-sample-python-fact](https://github.com/alexa-samples/skill-sample-python-fact) 37 | 38 | ## Documentation 39 | 40 | - [Host a Custom Skill as an AWS Lambda Function](https://developer.amazon.com/en-US/docs/alexa/custom-skills/host-a-custom-skill-as-an-aws-lambda-function.html) 41 | -------------------------------------------------------------------------------- /docs/amazon-msk.md: -------------------------------------------------------------------------------- 1 | # Amazon MSK 2 | 3 | Amazon Managed Streaming for Apache Kafka (Amazon MSK) is a fully managed service that you can use to build and run applications that use Apache Kafka to 4 | process streaming data. 5 | 6 | Lambda internally polls for new messages from the event source and then synchronously invokes the target Lambda function. Lambda reads the messages in 7 | batches and provides these to your function as an event payload. 8 | 9 | ## Limits 10 | 11 | - The maximum batch size is configurable. (The default is 100 messages.) 12 | - Lambda can run your function for up to 14 minutes. 13 | 14 | ## Request 15 | 16 | !!! Note 17 | Shares the same structure as [Self managed Apache Kafka](./apache-kafka.md), except for the eventSource field is set to "aws:msk". 18 | 19 | ```json title="Managed Kafka" 20 | --8<-- "docs/events/amazon-msk/amazon-msk-1.json" 21 | ``` 22 | 23 | ```json title="Another managed Kafka example" 24 | --8<-- "docs/events/amazon-msk/amazon-msk-2.json" 25 | ``` 26 | 27 | ## Response 28 | 29 | ## Resources 30 | 31 | Typed Lambda handlers by Language 32 | 33 | - [Typescript - MSKEvent](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/aws-lambda/trigger/msk.d.ts) - NPM `@types/aws-lambda` 34 | 35 | ### Code examples 36 | 37 | - [Amazon MSK AWS Lambda Integration Lab - Code](https://github.com/aws-samples/integration-sample-lambda-msk) 38 | 39 | ## Documentation 40 | 41 | - [Using Lambda with Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html) 42 | - [Using Amazon MSK as an event source for AWS Lambda](https://aws.amazon.com/blogs/compute/using-amazon-msk-as-an-event-source-for-aws-lambda/) 43 | -------------------------------------------------------------------------------- /docs/apache-kafka.md: -------------------------------------------------------------------------------- 1 | # Apache Kafka 2 | 3 | Lambda internally polls for new messages from the event source and then synchronously invokes the target Lambda function. Lambda reads the messages in batches and provides these to your function as an event payload. The maximum batch size is configurable. (The default is 100 messages.) 4 | 5 | ## Request 6 | 7 | !!! NOTE 8 | Shares the same structure as [Amazon MSK](./amazon-msk.md), except for the eventSource field is set to "aws:SelfManagedKafka". 9 | 10 | ```json title="Self managed kafka example" 11 | --8<-- "docs/events/apache-kafka/apache-kafka.json" 12 | ``` 13 | 14 | ## Response 15 | 16 | ## Resources 17 | 18 | - [Go - KafkaEvent](https://github.com/aws/aws-lambda-go/blob/main/events/kafka.go) 19 | - [Java - KafkaEvent](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/KafkaEvent.java) 20 | 21 | ## Documentation 22 | 23 | - [Using Lambda with self-managed Apache Kafka](https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html) 24 | - [Using self-hosted Apache Kafka as an event source for AWS Lambda](https://aws.amazon.com/blogs/compute/using-self-hosted-apache-kafka-as-an-event-source-for-aws-lambda/) 25 | -------------------------------------------------------------------------------- /docs/code-commit.md: -------------------------------------------------------------------------------- 1 | # Code Commit 2 | 3 | Event-driven, asynchronous invocation. CodeCommit repository events in the repository invoke a Lambda function 4 | 5 | ## Request 6 | 7 | ### Getting the correlation id 8 | 9 | JSON patch `Records[*].eventId` 10 | 11 | ### Generating sample events 12 | 13 | ```shell 14 | sam local generate-event codecommit repository 15 | ``` 16 | 17 | ### Request example 18 | 19 | ```json title="AWS CodeCommit message event example" 20 | --8<-- "docs/events/code-commit/code-commit.json" 21 | ``` 22 | 23 | ## Response 24 | 25 | N/A 26 | 27 | ## Resources 28 | 29 | Typed Lambda handlers by Language 30 | 31 | - [Java - CodeCommitEvent](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/CodeCommitEvent.java) - Maven `aws-lambda-java-events` 32 | - [Go - CodeCommitEvent](https://github.com/aws/aws-lambda-go/blob/main/events/README_CodeCommit.md) 33 | - [Rust - CodeCommitEvent](https://github.com/LegNeato/aws-lambda-events/blob/master/aws_lambda_events/src/generated/code_commit.rs) 34 | 35 | ### Code Example 36 | 37 | ```python title="example prints repo url message to cloudwatch logs" 38 | import json 39 | import boto3 40 | 41 | codecommit = boto3.client('codecommit') 42 | 43 | def lambda_handler(event, context): 44 | #Log the updated references from the event 45 | references = { reference['ref'] for reference in event['Records'][0]['codecommit']['references'] } 46 | print("References: " + str(references)) 47 | 48 | #Get the repository from the event and show its git clone URL 49 | repository = event['Records'][0]['eventSourceARN'].split(':')[5] 50 | try: 51 | response = codecommit.get_repository(repositoryName=repository) 52 | print("Clone URL: " +response['repositoryMetadata']['cloneUrlHttp']) 53 | return response['repositoryMetadata']['cloneUrlHttp'] 54 | except Exception as e: 55 | print(e) 56 | print('Error getting repository {}. Make sure it exists and that your repository is in the same region as this function.'.format(repository)) 57 | raise e 58 | ``` 59 | 60 | Code examples in Python and NodeJS: 61 | 62 | - [AWS Lambda Functions Code Samples for AWS CodeCommit](https://docs.aws.amazon.com/code-samples/latest/catalog/code-catalog-lambda_functions-codecommit.html) 63 | 64 | ???+ tip "Tip: Monitoring commits" 65 | 66 | See [CodeCommit Repository State Change](./event-bridge.md#codecommit-repository-state-change) for better alternatives to monitoring CodeCommit. 67 | 68 | ## Documentation 69 | 70 | - [Create an AWS CodeCommit trigger for an AWS Lambda function](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-notify-lambda.html) 71 | - [Using AWS Lambda with AWS CodeCommit](https://docs.aws.amazon.com/lambda/latest/dg/services-codecommit.html) 72 | -------------------------------------------------------------------------------- /docs/cognito-events.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cognito Events 3 | --- 4 | 5 | # Amazon Cognito Events 6 | 7 | Amazon Cognito Events allows you to execute an AWS Lambda function in response to important events in Amazon Cognito. 8 | 9 | Event-driven, synchronous invocation 10 | 11 | ## Request 12 | 13 | ```json 14 | --8<-- "docs/events/cognito-events/cognito-event.json" 15 | ``` 16 | 17 | ## Response 18 | 19 | N/A 20 | 21 | ## Resources 22 | 23 | - [DotNet - CognitoEvent](https://github.com/aws/aws-lambda-dotnet/tree/master/Libraries/src/Amazon.Lambda.CognitoEvents) - NuGet `Amazon.Lambda.CognitoEvents` 24 | - [Java - CognitoEvent](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/CognitoEvent.java) - Maven `aws-lambda-java-events` 25 | 26 | ### Code Examples 27 | 28 | ```javascript 29 | exports.handler = function(event, context) { 30 | //Check for the event type 31 | if (event.eventType === 'SyncTrigger') { 32 | //Modify value for a key 33 | if('SampleKey1' in event.datasetRecords){ 34 | event.datasetRecords.SampleKey1.newValue = 'ModifyValue1'; 35 | event.datasetRecords.SampleKey1.op = 'replace'; 36 | } 37 | 38 | //Remove a key 39 | if('SampleKey2' in event.datasetRecords){ 40 | event.datasetRecords.SampleKey2.op = 'remove'; 41 | } 42 | 43 | //Add a key 44 | if(!('SampleKey3' in event.datasetRecords)){ 45 | event.datasetRecords.SampleKey3={'newValue':'ModifyValue3', 'op' : 'replace'}; 46 | } 47 | } 48 | 49 | context.done(null, event); 50 | }; 51 | ``` 52 | 53 | ## Documentation 54 | 55 | - [Amazon Cognito Events](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-events.html) 56 | -------------------------------------------------------------------------------- /docs/config.md: -------------------------------------------------------------------------------- 1 | # Amazon Config 2 | 3 | You can use AWS Lambda functions to evaluate whether your AWS resource configurations comply with your custom Config rules. As resources are created, deleted, or changed, AWS Config records these changes and sends the information to your Lambda functions. Your Lambda functions then evaluate the changes and report results to AWS Config. 4 | 5 | Event-driven asynchronous invocation 6 | 7 | ## Request 8 | 9 | ```json 10 | --8<-- "docs/events/amazon-config/amazon-config.json" 11 | ``` 12 | 13 | ## Response 14 | 15 | N/A 16 | 17 | ## Resources 18 | 19 | Resources and templates for AWS Config rules 20 | 21 | - [AWS Config Rules Repository](https://github.com/awslabs/aws-config-rules) - AWS Community repository of custom Config rules. 22 | - [AWS Config Managed Rules](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html) 23 | - [Blog - Introducing the AWS Config Rule Development Kit (RDK)](https://aws.amazon.com/blogs/mt/introducing-the-aws-config-rule-development-kit-rdk/) 24 | 25 | ## Documentation 26 | 27 | - [Using AWS Lambda with AWS Config](https://docs.aws.amazon.com/lambda/latest/dg/services-config.html) 28 | - [Developing a Custom Rule for AWS Config](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_develop-rules_nodejs.html) 29 | -------------------------------------------------------------------------------- /docs/connect.md: -------------------------------------------------------------------------------- 1 | # Amazon Connect 2 | 3 | Amazon Connect invokes your Lambda function synchronously with an event that contains the request body and metadata. 4 | 5 | Event-driven, synchronous invocation 6 | 7 | ## Request 8 | 9 | ### Example event 10 | 11 | Amazon Connect invokes your Lambda function synchronously with an event that contains the request body and metadata. 12 | 13 | ```json title="Example Amazon Connect request event" 14 | --8<-- "docs/events/amazon-connect/amazon-connect.json" 15 | ``` 16 | 17 | ## Response 18 | 19 | No required response format 20 | 21 | ```json 22 | { 23 | "Name": "CustomerName", 24 | "Address": "1234 Main Road", 25 | "CallerType": "Patient" 26 | } 27 | ``` 28 | 29 | ## Resources 30 | 31 | - [Typescript - ConnectContactFlowEvent](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/aws-lambda/trigger/connect-contact-flow.d.ts) - NPM `@types/aws-lambda` 32 | - [Java - ConnectEvent](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/ConnectEvent.java) - Maven `aws-lambda-java-events` 33 | - [Python - ConnectContactFlowEvent](https://awslabs.github.io/aws-lambda-powertools-python/latest/utilities/data_classes/#verify-auth-challenge-response-example) - pip `aws-lambda-powertools` 34 | - [DotNet - ContactFlowEvent](https://github.com/aws/aws-lambda-dotnet/tree/master/Libraries/src/Amazon.Lambda.ConnectEvents) - Nuget `Amazon.Lambda.ConnectEvents` 35 | 36 | ## Documentation 37 | 38 | - [Using Lambda with Amazon Connect](https://docs.aws.amazon.com/lambda/latest/dg/services-connect.html) 39 | - [Config - Invoke AWS Lambda functions](https://docs.aws.amazon.com/connect/latest/adminguide/connect-lambda-functions.html) 40 | -------------------------------------------------------------------------------- /docs/events/alb/alb.json: -------------------------------------------------------------------------------- 1 | { 2 | "requestContext": { 3 | "elb": { 4 | "targetGroupArn": "arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/lambda-279XGJDqGZ5rsrHC2Fjr/49e9d65c45c6791a" 5 | } 6 | }, 7 | "httpMethod": "GET", 8 | "path": "/lambda", 9 | "queryStringParameters": { 10 | "query": "1234ABCD" 11 | }, 12 | "multiValueQueryStringParameters": { 13 | "myKey": [ 14 | "val1", 15 | "val2" 16 | ] 17 | }, 18 | "headers": { 19 | "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", 20 | "accept-encoding": "gzip", 21 | "accept-language": "en-US,en;q=0.9", 22 | "connection": "keep-alive", 23 | "host": "lambda-alb-123578498.us-east-2.elb.amazonaws.com", 24 | "upgrade-insecure-requests": "1", 25 | "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36", 26 | "x-amzn-trace-id": "Root=1-5c536348-3d683b8b04734faae651f476", 27 | "x-forwarded-for": "72.12.164.125", 28 | "x-forwarded-port": "80", 29 | "x-forwarded-proto": "http", 30 | "x-imforwards": "20" 31 | }, 32 | "body": "Test", 33 | "isBase64Encoded": false 34 | } -------------------------------------------------------------------------------- /docs/events/alexa-skills-kit/end-session.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "session": { 4 | "new": false, 5 | "sessionId": "amzn1.echo-api.session.123456789012", 6 | "application": { 7 | "applicationId": "amzn1.ask.skill.987654321" 8 | }, 9 | "attributes": {}, 10 | "user": { 11 | "userId": "amzn1.ask.account.testUser" 12 | } 13 | }, 14 | "context": { 15 | "System": { 16 | "application": { 17 | "applicationId": "amzn1.ask.skill.987654321" 18 | }, 19 | "user": { 20 | "userId": "amzn1.ask.account.testUser" 21 | }, 22 | "device": { 23 | "supportedInterfaces": { 24 | "AudioPlayer": {} 25 | } 26 | } 27 | } 28 | }, 29 | "request": { 30 | "type": "SessionEndedRequest", 31 | "requestId": "amzn1.echo-api.request.1234", 32 | "timestamp": "2016-10-27T21:11:41Z", 33 | "locale": "en-US", 34 | "reason": "USER_INITIATED" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /docs/events/alexa-skills-kit/intent-answer.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "session": { 4 | "new": false, 5 | "sessionId": "amzn1.echo-api.session.123456789012", 6 | "application": { 7 | "applicationId": "amzn1.ask.skill.987654321" 8 | }, 9 | "attributes": { 10 | "score": 0, 11 | "currentQuestionIndex": 0, 12 | "speechOutput": "Question 1. What was Rudolph's father's name? 1. Blixen. 2. Comet. 3. Donner. 4. Dasher. ", 13 | "correctAnswerText": "Donner", 14 | "repromptText": "Question 1. What was Rudolph's father's name? 1. Blixen. 2. Comet. 3. Donner. 4. Dasher. ", 15 | "questions": [ 16 | 16, 17 | 20, 18 | 29, 19 | 2, 20 | 19 21 | ], 22 | "STATE": "_TRIVIAMODE", 23 | "correctAnswerIndex": 3 24 | }, 25 | "user": { 26 | "userId": "amzn1.ask.account.testUser" 27 | } 28 | }, 29 | "context": { 30 | "AudioPlayer": { 31 | "playerActivity": "IDLE" 32 | }, 33 | "System": { 34 | "application": { 35 | "applicationId": "amzn1.ask.skill.987654321" 36 | }, 37 | "user": { 38 | "userId": "amzn1.ask.account.testUser" 39 | }, 40 | "device": { 41 | "supportedInterfaces": { 42 | "AudioPlayer": {} 43 | } 44 | } 45 | } 46 | }, 47 | "request": { 48 | "type": "IntentRequest", 49 | "requestId": "amzn1.echo-api.request.1234", 50 | "timestamp": "2016-10-27T21:06:28Z", 51 | "locale": "en-US", 52 | "intent": { 53 | "name": "AnswerIntent", 54 | "slots": { 55 | "Item": { 56 | "name": "Answer", 57 | "value": "1" 58 | } 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /docs/events/alexa-skills-kit/intent-getnewfact.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "session": { 4 | "new": false, 5 | "sessionId": "amzn1.echo-api.session.123456789012", 6 | "application": { 7 | "applicationId": "amzn1.ask.skill.987654321" 8 | }, 9 | "attributes": {}, 10 | "user": { 11 | "userId": "amzn1.ask.account.testUser" 12 | } 13 | }, 14 | "context": { 15 | "AudioPlayer": { 16 | "playerActivity": "IDLE" 17 | }, 18 | "System": { 19 | "application": { 20 | "applicationId": "amzn1.ask.skill.987654321" 21 | }, 22 | "user": { 23 | "userId": "amzn1.ask.account.testUser" 24 | }, 25 | "device": { 26 | "supportedInterfaces": { 27 | "AudioPlayer": {} 28 | } 29 | } 30 | } 31 | }, 32 | "request": { 33 | "type": "IntentRequest", 34 | "requestId": "amzn1.echo-api.request.1234", 35 | "timestamp": "2016-10-27T21:06:28Z", 36 | "locale": "en-US", 37 | "intent": { 38 | "name": "GetNewFactIntent", 39 | "slots": {} 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /docs/events/alexa-skills-kit/intent-mycoloris.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "session": { 4 | "new": false, 5 | "sessionId": "amzn1.echo-api.session.123456789012", 6 | "application": { 7 | "applicationId": "amzn1.ask.skill.987654321" 8 | }, 9 | "attributes": {}, 10 | "user": { 11 | "userId": "amzn1.ask.account.testUser" 12 | } 13 | }, 14 | "context": { 15 | "AudioPlayer": { 16 | "playerActivity": "IDLE" 17 | }, 18 | "System": { 19 | "application": { 20 | "applicationId": "amzn1.ask.skill.987654321" 21 | }, 22 | "user": { 23 | "userId": "amzn1.ask.account.testUser" 24 | }, 25 | "device": { 26 | "supportedInterfaces": { 27 | "AudioPlayer": {} 28 | } 29 | } 30 | } 31 | }, 32 | "request": { 33 | "type": "IntentRequest", 34 | "requestId": "amzn1.echo-api.request.1234", 35 | "timestamp": "2016-10-27T21:06:28Z", 36 | "locale": "en-US", 37 | "intent": { 38 | "name": "MyColorIsIntent", 39 | "slots": { 40 | "Color": { 41 | "name": "Color", 42 | "value": "blue" 43 | } 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /docs/events/alexa-skills-kit/intent-recipe.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "session": { 4 | "new": false, 5 | "sessionId": "amzn1.echo-api.session.123456789012", 6 | "application": { 7 | "applicationId": "amzn1.ask.skill.987654321" 8 | }, 9 | "attributes": {}, 10 | "user": { 11 | "userId": "amzn1.ask.account.testUser" 12 | } 13 | }, 14 | "context": { 15 | "AudioPlayer": { 16 | "playerActivity": "IDLE" 17 | }, 18 | "System": { 19 | "application": { 20 | "applicationId": "amzn1.ask.skill.987654321" 21 | }, 22 | "user": { 23 | "userId": "amzn1.ask.account.userId" 24 | }, 25 | "device": { 26 | "supportedInterfaces": { 27 | "AudioPlayer": {} 28 | } 29 | } 30 | } 31 | }, 32 | "request": { 33 | "type": "IntentRequest", 34 | "requestId": "amzn1.echo-api.request.1234", 35 | "timestamp": "2016-10-27T21:06:28Z", 36 | "locale": "en-US", 37 | "intent": { 38 | "name": "RecipeIntent", 39 | "slots": { 40 | "Item": { 41 | "name": "Item", 42 | "value": "snowball" 43 | } 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /docs/events/alexa-skills-kit/start-session.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "session": { 4 | "new": true, 5 | "sessionId": "amzn1.echo-api.session.123456789012", 6 | "application": { 7 | "applicationId": "amzn1.ask.skill.987654321" 8 | }, 9 | "user": { 10 | "userId": "amzn1.ask.account.testUser" 11 | }, 12 | "attributes": {} 13 | }, 14 | "context": { 15 | "AudioPlayer": { 16 | "playerActivity": "IDLE" 17 | }, 18 | "System": { 19 | "application": { 20 | "applicationId": "amzn1.ask.skill.987654321" 21 | }, 22 | "user": { 23 | "userId": "amzn1.ask.account.testUser" 24 | }, 25 | "device": { 26 | "supportedInterfaces": { 27 | "AudioPlayer": {} 28 | } 29 | } 30 | } 31 | }, 32 | "request": { 33 | "type": "LaunchRequest", 34 | "requestId": "amzn1.echo-api.request.1234", 35 | "timestamp": "2016-10-27T18:21:44Z", 36 | "locale": "en-US" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /docs/events/alexa/alex-smart-home-skill-v1.json: -------------------------------------------------------------------------------- 1 | { 2 | "header": { 3 | "payloadVersion": "1", 4 | "namespace": "Control", 5 | "name": "SwitchOnOffRequest" 6 | }, 7 | "payload": { 8 | "switchControlAction": "TURN_ON", 9 | "appliance": { 10 | "additionalApplianceDetails": { 11 | "key2": "value2", 12 | "key1": "value1" 13 | }, 14 | "applianceId": "sampleId" 15 | }, 16 | "accessToken": "sampleAccessToken" 17 | } 18 | } -------------------------------------------------------------------------------- /docs/events/alexa/alex-smart-home-skill-v3.json: -------------------------------------------------------------------------------- 1 | { 2 | "directive": { 3 | "header": { 4 | "namespace": "Alexa.Discovery", 5 | "name": "Discover", 6 | "payloadVersion": "3", 7 | "messageId": "1bd5d003-31b9-476f-ad03-71d471922820" 8 | }, 9 | "payload": { 10 | "scope": { 11 | "type": "BearerToken" 12 | } 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /docs/events/amazon-config/amazon-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "invokingEvent": "{\"configurationItem\":{\"configurationItemCaptureTime\":\"2016-02-17T01:36:34.043Z\",\"awsAccountId\":\"000000000000\",\"configurationItemStatus\":\"OK\",\"resourceId\":\"i-00000000\",\"ARN\":\"arn:aws:ec2:us-east-1:000000000000:instance/i-00000000\",\"awsRegion\":\"us-east-1\",\"availabilityZone\":\"us-east-1a\",\"resourceType\":\"AWS::EC2::Instance\",\"tags\":{\"Foo\":\"Bar\"},\"relationships\":[{\"resourceId\":\"eipalloc-00000000\",\"resourceType\":\"AWS::EC2::EIP\",\"name\":\"Is attached to ElasticIp\"}],\"configuration\":{\"foo\":\"bar\"}},\"messageType\":\"ConfigurationItemChangeNotification\"}", 3 | "ruleParameters": "{\"myParameterKey\":\"myParameterValue\"}", 4 | "resultToken": "myResultToken", 5 | "eventLeftScope": false, 6 | "executionRoleArn": "arn:aws:iam::012345678912:role/config-role", 7 | "configRuleArn": "arn:aws:config:us-east-1:012345678912:config-rule/config-rule-0123456", 8 | "configRuleName": "change-triggered-config-rule", 9 | "configRuleId": "config-rule-0123456", 10 | "accountId": "012345678912", 11 | "version": "1.0" 12 | } -------------------------------------------------------------------------------- /docs/events/amazon-connect/amazon-connect.json: -------------------------------------------------------------------------------- 1 | { 2 | "Details": { 3 | "ContactData": { 4 | "Attributes": {}, 5 | "Channel": "VOICE", 6 | "ContactId": "4a573372-1f28-4e26-b97b-XXXXXXXXXXX", 7 | "CustomerEndpoint": { 8 | "Address": "+1234567890", 9 | "Type": "TELEPHONE_NUMBER" 10 | }, 11 | "InitialContactId": "4a573372-1f28-4e26-b97b-XXXXXXXXXXX", 12 | "InitiationMethod": "INBOUND | OUTBOUND | TRANSFER | CALLBACK", 13 | "InstanceARN": "arn:aws:connect:aws-region:1234567890:instance/c8c0e68d-2200-4265-82c0-XXXXXXXXXX", 14 | "PreviousContactId": "4a573372-1f28-4e26-b97b-XXXXXXXXXXX", 15 | "Queue": { 16 | "ARN": "arn:aws:connect:eu-west-2:111111111111:instance/cccccccc-bbbb-dddd-eeee-ffffffffffff/queue/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", 17 | "Name": "PasswordReset" 18 | }, 19 | "SystemEndpoint": { 20 | "Address": "+1234567890", 21 | "Type": "TELEPHONE_NUMBER" 22 | } 23 | }, 24 | "Parameters": { 25 | "sentAttributeKey": "sentAttributeValue" 26 | } 27 | }, 28 | "Name": "ContactFlowEvent" 29 | } -------------------------------------------------------------------------------- /docs/events/amazon-mq/active-mq.json: -------------------------------------------------------------------------------- 1 | { 2 | "eventSource": "aws:amq", 3 | "eventSourceArn": "arn:aws:mq:us-west-2:112556298976:broker:test:b-9bcfa592-423a-4942-879d-eb284b418fc8", 4 | "messages": [ 5 | { 6 | "messageID": "ID:b-9bcfa592-423a-4942-879d-eb284b418fc8-1.mq.us-west-2.amazonaws.com-37557-1234520418293-4:1:1:1:1", 7 | "messageType": "jms/text-message", 8 | "data": "QUJDOkFBQUE=", 9 | "connectionId": "myJMSCoID", 10 | "redelivered": false, 11 | "destination": { 12 | "physicalname": "testQueue" 13 | }, 14 | "timestamp": 1598827811958, 15 | "brokerInTime": 1598827811958, 16 | "brokerOutTime": 1598827811959 17 | }, 18 | { 19 | "messageID": "ID:b-9bcfa592-423a-4942-879d-eb284b418fc8-1.mq.us-west-2.amazonaws.com-37557-1234520418293-4:1:1:1:1", 20 | "messageType": "jms/bytes-message", 21 | "data": "3DTOOW7crj51prgVLQaGQ82S48k=", 22 | "connectionId": "myJMSCoID1", 23 | "persistent": false, 24 | "destination": { 25 | "physicalname": "testQueue" 26 | }, 27 | "timestamp": 1598827811958, 28 | "brokerInTime": 1598827811958, 29 | "brokerOutTime": 1598827811959 30 | } 31 | ] 32 | } -------------------------------------------------------------------------------- /docs/events/amazon-mq/rabbit-mq.json: -------------------------------------------------------------------------------- 1 | { 2 | "eventSource": "aws:rmq", 3 | "eventSourceArn": "arn:aws:mq:us-west-2:112556298976:broker:pizzaBroker:b-9bcfa592-423a-4942-879d-eb284b418fc8", 4 | "rmqMessagesByQueue": { 5 | "pizzaQueue::/": [ 6 | { 7 | "basicProperties": { 8 | "contentType": "text/plain", 9 | "contentEncoding": null, 10 | "headers": { 11 | "header1": { 12 | "bytes": [ 13 | 118, 14 | 97, 15 | 108, 16 | 117, 17 | 101, 18 | 49 19 | ] 20 | }, 21 | "header2": { 22 | "bytes": [ 23 | 118, 24 | 97, 25 | 108, 26 | 117, 27 | 101, 28 | 50 29 | ] 30 | }, 31 | "numberInHeader": 10 32 | }, 33 | "deliveryMode": 1, 34 | "priority": 34, 35 | "correlationId": null, 36 | "replyTo": null, 37 | "expiration": "60000", 38 | "messageId": null, 39 | "timestamp": "Jan 1, 1970, 12:33:41 AM", 40 | "type": null, 41 | "userId": "AIDACKCEVSQ6C2EXAMPLE", 42 | "appId": null, 43 | "clusterId": null, 44 | "bodySize": 80 45 | }, 46 | "redelivered": false, 47 | "data": "eyJ0aW1lb3V0IjowLCJkYXRhIjoiQ1pybWYwR3c4T3Y0YnFMUXhENEUifQ==" 48 | } 49 | ] 50 | } 51 | } -------------------------------------------------------------------------------- /docs/events/amazon-msk/amazon-msk-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "eventSource": "aws:kafka", 3 | "eventSourceArn": "arn:aws:kafka:sa-east-1:123456789012:cluster/vpc-2priv-2pub/751d2973-a626-431c-9d4e-d7975eb44dd7-2", 4 | "records": { 5 | "mytopic-0": [ 6 | { 7 | "topic": "mytopic", 8 | "partition": "0", 9 | "offset": 15, 10 | "timestamp": 1545084650987, 11 | "timestampType": "CREATE_TIME", 12 | "value": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==", 13 | "headers": [ 14 | { 15 | "headerKey": [ 16 | 104, 17 | 101, 18 | 97, 19 | 100, 20 | 101, 21 | 114, 22 | 86, 23 | 97, 24 | 108, 25 | 117, 26 | 101 27 | ] 28 | } 29 | ] 30 | } 31 | ] 32 | } 33 | } -------------------------------------------------------------------------------- /docs/events/amazon-msk/amazon-msk-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "eventSource": "aws:kafka", 3 | "eventSourceArn": "arn:aws:kafka:us-west-2:012345678901:cluster/ExampleMSKCluster/e9f754c6-d29a-4430-a7db-958a19fd2c54-4", 4 | "bootstrapServers": "b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092,b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", 5 | "records": { 6 | "AWSKafkaTopic-0": [ 7 | { 8 | "topic": "AWSKafkaTopic", 9 | "partition": 0, 10 | "offset": 0, 11 | "timestamp": 1595035749700, 12 | "timestampType": "CREATE_TIME", 13 | "key": "OGQ1NTk2YjQtMTgxMy00MjM4LWIyNGItNmRhZDhlM2QxYzBj", 14 | "value": "OGQ1NTk2YjQtMTgxMy00MjM4LWIyNGItNmRhZDhlM2QxYzBj", 15 | "headers": [ 16 | { 17 | "headerKey": "aGVhZGVyVmFsdWU=" 18 | } 19 | ] 20 | } 21 | ] 22 | } 23 | } -------------------------------------------------------------------------------- /docs/events/apache-kafka/apache-kafka.json: -------------------------------------------------------------------------------- 1 | { 2 | "eventSource": "aws:SelfManagedKafka", 3 | "bootstrapServers": "b-2.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092,b-1.demo-cluster-1.a1bcde.c1.kafka.us-east-1.amazonaws.com:9092", 4 | "records": { 5 | "mytopic-0": [ 6 | { 7 | "topic": "mytopic", 8 | "partition": "0", 9 | "offset": 15, 10 | "timestamp": 1545084650987, 11 | "timestampType": "CREATE_TIME", 12 | "value": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==", 13 | "headers": [ 14 | { 15 | "headerKey": [ 16 | 104, 17 | 101, 18 | 97, 19 | 100, 20 | 101, 21 | 114, 22 | 86, 23 | 97, 24 | 108, 25 | 117, 26 | 101 27 | ] 28 | } 29 | ] 30 | } 31 | ] 32 | } 33 | } -------------------------------------------------------------------------------- /docs/events/api-gateway/api-gateway-authorizer-format-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "type": "REQUEST", 4 | "methodArn": "arn:aws:execute-api:us-east-1:123456789012:abcdef123/test/GET/request", 5 | "identitySource": "user1,123", 6 | "authorizationToken": "user1,123", 7 | "resource": "/request", 8 | "path": "/request", 9 | "httpMethod": "GET", 10 | "headers": { 11 | "X-AMZ-Date": "20170718T062915Z", 12 | "Accept": "*/*", 13 | "HeaderAuth1": "headerValue1", 14 | "CloudFront-Viewer-Country": "US", 15 | "CloudFront-Forwarded-Proto": "https", 16 | "CloudFront-Is-Tablet-Viewer": "false", 17 | "CloudFront-Is-Mobile-Viewer": "false", 18 | "User-Agent": "..." 19 | }, 20 | "queryStringParameters": { 21 | "QueryString1": "queryValue1" 22 | }, 23 | "pathParameters": {}, 24 | "stageVariables": { 25 | "StageVar1": "stageValue1" 26 | }, 27 | "requestContext": { 28 | "path": "/request", 29 | "accountId": "123456789012", 30 | "resourceId": "05c7jb", 31 | "stage": "test", 32 | "requestId": "...", 33 | "identity": { 34 | "apiKey": "...", 35 | "sourceIp": "...", 36 | "clientCert": { 37 | "clientCertPem": "CERT_CONTENT", 38 | "subjectDN": "www.example.com", 39 | "issuerDN": "Example issuer", 40 | "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", 41 | "validity": { 42 | "notBefore": "May 28 12:30:02 2019 GMT", 43 | "notAfter": "Aug 5 09:36:04 2021 GMT" 44 | } 45 | } 46 | }, 47 | "resourcePath": "/request", 48 | "httpMethod": "GET", 49 | "apiId": "abcdef123" 50 | } 51 | } -------------------------------------------------------------------------------- /docs/events/api-gateway/api-gateway-authorizer-format-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "type": "REQUEST", 4 | "routeArn": "arn:aws:execute-api:us-east-1:123456789012:abcdef123/test/GET/request", 5 | "identitySource": [ 6 | "user1", 7 | "123" 8 | ], 9 | "routeKey": "$default", 10 | "rawPath": "/my/path", 11 | "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", 12 | "cookies": [ 13 | "cookie1", 14 | "cookie2" 15 | ], 16 | "headers": { 17 | "Header1": "value1", 18 | "Header2": "value2" 19 | }, 20 | "queryStringParameters": { 21 | "parameter1": "value1,value2", 22 | "parameter2": "value" 23 | }, 24 | "requestContext": { 25 | "accountId": "123456789012", 26 | "apiId": "api-id", 27 | "authentication": { 28 | "clientCert": { 29 | "clientCertPem": "CERT_CONTENT", 30 | "subjectDN": "www.example.com", 31 | "issuerDN": "Example issuer", 32 | "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", 33 | "validity": { 34 | "notBefore": "May 28 12:30:02 2019 GMT", 35 | "notAfter": "Aug 5 09:36:04 2021 GMT" 36 | } 37 | } 38 | }, 39 | "domainName": "id.execute-api.us-east-1.amazonaws.com", 40 | "domainPrefix": "id", 41 | "http": { 42 | "method": "POST", 43 | "path": "/my/path", 44 | "protocol": "HTTP/1.1", 45 | "sourceIp": "IP", 46 | "userAgent": "agent" 47 | }, 48 | "requestId": "id", 49 | "routeKey": "$default", 50 | "stage": "$default", 51 | "time": "12/Mar/2020:19:03:58 +0000", 52 | "timeEpoch": 1583348638390 53 | }, 54 | "pathParameters": { 55 | "parameter1": "value1" 56 | }, 57 | "stageVariables": { 58 | "stageVariable1": "value1", 59 | "stageVariable2": "value2" 60 | } 61 | } -------------------------------------------------------------------------------- /docs/events/api-gateway/http-api-format-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "resource": "/my/path", 4 | "path": "/my/path", 5 | "httpMethod": "GET", 6 | "headers": { 7 | "header1": "value1", 8 | "header2": "value2" 9 | }, 10 | "multiValueHeaders": { 11 | "header1": [ 12 | "value1" 13 | ], 14 | "header2": [ 15 | "value1", 16 | "value2" 17 | ] 18 | }, 19 | "queryStringParameters": { 20 | "parameter1": "value1", 21 | "parameter2": "value" 22 | }, 23 | "multiValueQueryStringParameters": { 24 | "parameter1": [ 25 | "value1", 26 | "value2" 27 | ], 28 | "parameter2": [ 29 | "value" 30 | ] 31 | }, 32 | "requestContext": { 33 | "accountId": "123456789012", 34 | "apiId": "id", 35 | "authorizer": { 36 | "claims": null, 37 | "scopes": null 38 | }, 39 | "domainName": "id.execute-api.us-east-1.amazonaws.com", 40 | "domainPrefix": "id", 41 | "extendedRequestId": "request-id", 42 | "httpMethod": "GET", 43 | "identity": { 44 | "accessKey": null, 45 | "accountId": null, 46 | "caller": null, 47 | "cognitoAuthenticationProvider": null, 48 | "cognitoAuthenticationType": null, 49 | "cognitoIdentityId": null, 50 | "cognitoIdentityPoolId": null, 51 | "principalOrgId": null, 52 | "sourceIp": "IP", 53 | "user": null, 54 | "userAgent": "user-agent", 55 | "userArn": null, 56 | "clientCert": { 57 | "clientCertPem": "CERT_CONTENT", 58 | "subjectDN": "www.example.com", 59 | "issuerDN": "Example issuer", 60 | "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", 61 | "validity": { 62 | "notBefore": "May 28 12:30:02 2019 GMT", 63 | "notAfter": "Aug 5 09:36:04 2021 GMT" 64 | } 65 | } 66 | }, 67 | "path": "/my/path", 68 | "protocol": "HTTP/1.1", 69 | "requestId": "id=", 70 | "requestTime": "04/Mar/2020:19:15:17 +0000", 71 | "requestTimeEpoch": 1583349317135, 72 | "resourceId": null, 73 | "resourcePath": "/my/path", 74 | "stage": "$default" 75 | }, 76 | "pathParameters": null, 77 | "stageVariables": null, 78 | "body": "Hello from Lambda!", 79 | "isBase64Encoded": false 80 | } -------------------------------------------------------------------------------- /docs/events/api-gateway/http-api-format-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "routeKey": "$default", 4 | "rawPath": "/my/path", 5 | "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", 6 | "cookies": [ 7 | "cookie1", 8 | "cookie2" 9 | ], 10 | "headers": { 11 | "Header1": "value1", 12 | "Header2": "value1,value2" 13 | }, 14 | "queryStringParameters": { 15 | "parameter1": "value1,value2", 16 | "parameter2": "value" 17 | }, 18 | "requestContext": { 19 | "accountId": "123456789012", 20 | "apiId": "api-id", 21 | "authentication": { 22 | "clientCert": { 23 | "clientCertPem": "CERT_CONTENT", 24 | "subjectDN": "www.example.com", 25 | "issuerDN": "Example issuer", 26 | "serialNumber": "a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1:a1", 27 | "validity": { 28 | "notBefore": "May 28 12:30:02 2019 GMT", 29 | "notAfter": "Aug 5 09:36:04 2021 GMT" 30 | } 31 | } 32 | }, 33 | "authorizer": { 34 | "jwt": { 35 | "claims": { 36 | "claim1": "value1", 37 | "claim2": "value2" 38 | }, 39 | "scopes": [ 40 | "scope1", 41 | "scope2" 42 | ] 43 | } 44 | }, 45 | "domainName": "id.execute-api.us-east-1.amazonaws.com", 46 | "domainPrefix": "id", 47 | "http": { 48 | "method": "POST", 49 | "path": "/my/path", 50 | "protocol": "HTTP/1.1", 51 | "sourceIp": "192.168.0.1/32", 52 | "userAgent": "agent" 53 | }, 54 | "requestId": "id", 55 | "routeKey": "$default", 56 | "stage": "$default", 57 | "time": "12/Mar/2020:19:03:58 +0000", 58 | "timeEpoch": 1583348638390 59 | }, 60 | "body": "{\"message\": \"hello world\", \"username\": \"tom\"}", 61 | "pathParameters": { 62 | "parameter1": "value1" 63 | }, 64 | "isBase64Encoded": false, 65 | "stageVariables": { 66 | "stageVariable1": "value1", 67 | "stageVariable2": "value2" 68 | } 69 | } -------------------------------------------------------------------------------- /docs/events/appsync/amplify-graphql-directive.json: -------------------------------------------------------------------------------- 1 | { 2 | "typeName": "Merchant", 3 | "fieldName": "locations", 4 | "arguments": { 5 | "page": 2, 6 | "size": 1, 7 | "name": "value" 8 | }, 9 | "identity": { 10 | "claims": { 11 | "sub": "07920713-4526-4642-9c88-2953512de441", 12 | "iss": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_POOL_ID", 13 | "aud": "58rc9bf5kkti90ctmvioppukm9", 14 | "event_id": "7f4c9383-abf6-48b7-b821-91643968b755", 15 | "token_use": "id", 16 | "auth_time": 1615366261, 17 | "name": "Michael Brewer", 18 | "exp": 1615369861, 19 | "iat": 1615366261 20 | }, 21 | "defaultAuthStrategy": "ALLOW", 22 | "groups": null, 23 | "issuer": "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_POOL_ID", 24 | "sourceIp": [ 25 | "11.215.2.22" 26 | ], 27 | "sub": "07920713-4526-4642-9c88-2953512de441", 28 | "username": "mike" 29 | }, 30 | "source": { 31 | "name": "Value", 32 | "nested": { 33 | "name": "value", 34 | "list": [] 35 | } 36 | }, 37 | "request": { 38 | "headers": { 39 | "x-forwarded-for": "11.215.2.22, 64.44.173.11", 40 | "cloudfront-viewer-country": "US", 41 | "cloudfront-is-tablet-viewer": "false", 42 | "via": "2.0 SOMETHING.cloudfront.net (CloudFront)", 43 | "cloudfront-forwarded-proto": "https", 44 | "origin": "https://console.aws.amazon.com", 45 | "content-length": "156", 46 | "accept-language": "en-US,en;q=0.9", 47 | "host": "SOMETHING.appsync-api.us-east-1.amazonaws.com", 48 | "x-forwarded-proto": "https", 49 | "sec-gpc": "1", 50 | "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) etc.", 51 | "accept": "*/*", 52 | "cloudfront-is-mobile-viewer": "false", 53 | "cloudfront-is-smarttv-viewer": "false", 54 | "accept-encoding": "gzip, deflate, br", 55 | "referer": "https://console.aws.amazon.com/", 56 | "content-type": "application/json", 57 | "sec-fetch-mode": "cors", 58 | "x-amz-cf-id": "Fo5VIuvP6V6anIEt62WzFDCK45mzM4yEdpt5BYxOl9OFqafd-WR0cA==", 59 | "x-amzn-trace-id": "Root=1-60488877-0b0c4e6727ab2a1c545babd0", 60 | "authorization": "AUTH-HEADER", 61 | "sec-fetch-dest": "empty", 62 | "x-amz-user-agent": "AWS-Console-AppSync/", 63 | "cloudfront-is-desktop-viewer": "true", 64 | "sec-fetch-site": "cross-site", 65 | "x-forwarded-port": "443" 66 | } 67 | }, 68 | "prev": { 69 | "result": {} 70 | } 71 | } -------------------------------------------------------------------------------- /docs/events/appsync/appsync-authorizer.json: -------------------------------------------------------------------------------- 1 | { 2 | "authorizationToken": "BE9DC5E3-D410-4733-AF76-70178092E681", 3 | "requestContext": { 4 | "apiId": "giy7kumfmvcqvbedntjwjvagii", 5 | "accountId": "254688921111", 6 | "requestId": "b80ed838-14c6-4500-b4c3-b694c7bef086", 7 | "queryString": "mutation MyNewTask($desc: String!) {\n createTask(description: $desc, owner: \"ccc\", taskStatus: \"cc\", title: \"ccc\") {\n id\n }\n}\n", 8 | "operationName": "MyNewTask", 9 | "variables": { 10 | "desc": "Foo" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /docs/events/appsync/appsync-direct-resolver.json: -------------------------------------------------------------------------------- 1 | { 2 | "arguments": { 3 | "id": "my identifier" 4 | }, 5 | "identity": { 6 | "claims": { 7 | "sub": "192879fc-a240-4bf1-ab5a-d6a00f3063f9", 8 | "email_verified": true, 9 | "iss": "https://cognito-idp.us-west-2.amazonaws.com/us-west-xxxxxxxxxxx", 10 | "phone_number_verified": false, 11 | "cognito:username": "jdoe", 12 | "aud": "7471s60os7h0uu77i1tk27sp9n", 13 | "event_id": "bc334ed8-a938-4474-b644-9547e304e606", 14 | "token_use": "id", 15 | "auth_time": 1599154213, 16 | "phone_number": "+19999999999", 17 | "exp": 1599157813, 18 | "iat": 1599154213, 19 | "email": "jdoe@email.com" 20 | }, 21 | "defaultAuthStrategy": "ALLOW", 22 | "groups": null, 23 | "issuer": "https://cognito-idp.us-west-2.amazonaws.com/us-west-xxxxxxxxxxx", 24 | "sourceIp": [ 25 | "1.1.1.1" 26 | ], 27 | "sub": "192879fc-a240-4bf1-ab5a-d6a00f3063f9", 28 | "username": "jdoe" 29 | }, 30 | "source": null, 31 | "request": { 32 | "headers": { 33 | "x-forwarded-for": "1.1.1.1, 2.2.2.2", 34 | "cloudfront-viewer-country": "US", 35 | "cloudfront-is-tablet-viewer": "false", 36 | "via": "2.0 xxxxxxxxxxxxxxxx.cloudfront.net (CloudFront)", 37 | "cloudfront-forwarded-proto": "https", 38 | "origin": "https://us-west-1.console.aws.amazon.com", 39 | "content-length": "217", 40 | "accept-language": "en-US,en;q=0.9", 41 | "host": "xxxxxxxxxxxxxxxx.appsync-api.us-west-1.amazonaws.com", 42 | "x-forwarded-proto": "https", 43 | "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36", 44 | "accept": "*/*", 45 | "cloudfront-is-mobile-viewer": "false", 46 | "cloudfront-is-smarttv-viewer": "false", 47 | "accept-encoding": "gzip, deflate, br", 48 | "referer": "https://us-west-1.console.aws.amazon.com/appsync/home?region=us-west-1", 49 | "content-type": "application/json", 50 | "sec-fetch-mode": "cors", 51 | "x-amz-cf-id": "3aykhqlUwQeANU-HGY7E_guV5EkNeMMtwyOgiA==", 52 | "x-amzn-trace-id": "Root=1-5f512f51-fac632066c5e848ae714", 53 | "authorization": "eyJraWQiOiJScWFCSlJqYVJlM0hrSnBTUFpIcVRXazNOW...", 54 | "sec-fetch-dest": "empty", 55 | "x-amz-user-agent": "AWS-Console-AppSync/", 56 | "cloudfront-is-desktop-viewer": "true", 57 | "sec-fetch-site": "cross-site", 58 | "x-forwarded-port": "443" 59 | } 60 | }, 61 | "prev": null, 62 | "info": { 63 | "selectionSetList": [ 64 | "id", 65 | "field1", 66 | "field2" 67 | ], 68 | "selectionSetGraphQL": "{\n id\n field1\n field2\n}", 69 | "parentTypeName": "Mutation", 70 | "fieldName": "createSomething", 71 | "variables": {} 72 | }, 73 | "stash": {} 74 | } -------------------------------------------------------------------------------- /docs/events/cloudformation/cloudformation-create.json: -------------------------------------------------------------------------------- 1 | { 2 | "RequestType": "Create", 3 | "ServiceToken": "arn:aws:lambda:us-east-2:123456789012:function:lambda-error-processor-primer-14ROR2T3JKU66", 4 | "ResponseURL": "https://cloudformation-custom-resource-response-useast2.s3-us-east-2.amazonaws.com/arn%3Aaws%3Acloudformation%3Aus-east-2%3A123456789012%3Astack/lambda-error-processor/1134083a-2608-1e91-9897-022501a2c456%7Cprimerinvoke%7C5d478078-13e9-baf0-464a-7ef285ecc786?AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&Expires=1555451971&Signature=28UijZePE5I4dvukKQqM%2F9Rf1o4%3D", 5 | "StackId": "arn:aws:cloudformation:us-east-2:123456789012:stack/lambda-error-processor/1134083a-2608-1e91-9897-022501a2c456", 6 | "RequestId": "5d478078-13e9-baf0-464a-7ef285ecc786", 7 | "LogicalResourceId": "primerinvoke", 8 | "ResourceType": "AWS::CloudFormation::CustomResource", 9 | "ResourceProperties": { 10 | "ServiceToken": "arn:aws:lambda:us-east-2:123456789012:function:lambda-error-processor-primer-14ROR2T3JKU66", 11 | "FunctionName": "lambda-error-processor-randomerror-ZWUC391MQAJK" 12 | } 13 | } -------------------------------------------------------------------------------- /docs/events/cloudformation/cloudformation-delete.json: -------------------------------------------------------------------------------- 1 | { 2 | "RequestType": "Delete", 3 | "RequestId": "unique id for this delete request", 4 | "ResponseURL": "pre-signed-url-for-delete-response", 5 | "ResourceType": "Custom::MyCustomResourceType", 6 | "LogicalResourceId": "name of resource in template", 7 | "StackId": "arn:aws:cloudformation:us-east-2:namespace:stack/stack-name/guid", 8 | "PhysicalResourceId": "custom resource provider-defined physical id", 9 | "ResourceProperties": { 10 | "key1": "string", 11 | "key2": [ 12 | "list" 13 | ], 14 | "key3": { 15 | "key4": "map" 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /docs/events/cloudformation/cloudformation-update.json: -------------------------------------------------------------------------------- 1 | { 2 | "RequestType": "Update", 3 | "ResponseURL": "http://pre-signed-S3-url-for-response", 4 | "StackId": "arn:aws:cloudformation:eu-central-1:123456789012:stack/MyStack/guid", 5 | "RequestId": "unique id for this create request", 6 | "ResourceType": "Custom::TestResource", 7 | "LogicalResourceId": "MyTestResource", 8 | "PhysicalResourceId": "MyTestResourceId", 9 | "ServiceToken": "abcd", 10 | "ResourceProperties": { 11 | "StackName": "MyStack", 12 | "List": [ 13 | "1", 14 | "2", 15 | "3" 16 | ] 17 | }, 18 | "OldResourceProperties": { 19 | "StackName": "MyStack", 20 | "List": [ 21 | "1" 22 | ] 23 | } 24 | } -------------------------------------------------------------------------------- /docs/events/cloudfront-lambda-edge/origin-request.json: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "cf": { 5 | "config": { 6 | "distributionDomainName": "d111111abcdef8.cloudfront.net", 7 | "distributionId": "EDFDVBD6EXAMPLE", 8 | "eventType": "origin-request", 9 | "requestId": "4TyzHTaYWb1GX1qTfsHhEqV6HUDd_BzoBZnwfnvQc_1oF26ClkoUSEQ==" 10 | }, 11 | "request": { 12 | "clientIp": "203.0.113.178", 13 | "headers": { 14 | "x-forwarded-for": [ 15 | { 16 | "key": "X-Forwarded-For", 17 | "value": "203.0.113.178" 18 | } 19 | ], 20 | "user-agent": [ 21 | { 22 | "key": "User-Agent", 23 | "value": "Amazon CloudFront" 24 | } 25 | ], 26 | "via": [ 27 | { 28 | "key": "Via", 29 | "value": "2.0 2afae0d44e2540f472c0635ab62c232b.cloudfront.net (CloudFront)" 30 | } 31 | ], 32 | "host": [ 33 | { 34 | "key": "Host", 35 | "value": "example.org" 36 | } 37 | ], 38 | "cache-control": [ 39 | { 40 | "key": "Cache-Control", 41 | "value": "no-cache, cf-no-cache" 42 | } 43 | ] 44 | }, 45 | "method": "GET", 46 | "origin": { 47 | "custom": { 48 | "customHeaders": {}, 49 | "domainName": "example.org", 50 | "keepaliveTimeout": 5, 51 | "path": "", 52 | "port": 443, 53 | "protocol": "https", 54 | "readTimeout": 30, 55 | "sslProtocols": [ 56 | "TLSv1", 57 | "TLSv1.1", 58 | "TLSv1.2" 59 | ] 60 | } 61 | }, 62 | "querystring": "", 63 | "uri": "/" 64 | } 65 | } 66 | } 67 | ] 68 | } -------------------------------------------------------------------------------- /docs/events/cloudfront-lambda-edge/viewer-request.json: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "cf": { 5 | "config": { 6 | "distributionDomainName": "d111111abcdef8.cloudfront.net", 7 | "distributionId": "EDFDVBD6EXAMPLE", 8 | "eventType": "viewer-request", 9 | "requestId": "4TyzHTaYWb1GX1qTfsHhEqV6HUDd_BzoBZnwfnvQc_1oF26ClkoUSEQ==" 10 | }, 11 | "request": { 12 | "clientIp": "203.0.113.178", 13 | "headers": { 14 | "host": [ 15 | { 16 | "key": "Host", 17 | "value": "d111111abcdef8.cloudfront.net" 18 | } 19 | ], 20 | "user-agent": [ 21 | { 22 | "key": "User-Agent", 23 | "value": "curl/7.66.0" 24 | } 25 | ], 26 | "accept": [ 27 | { 28 | "key": "accept", 29 | "value": "*/*" 30 | } 31 | ] 32 | }, 33 | "method": "GET", 34 | "querystring": "", 35 | "uri": "/" 36 | } 37 | } 38 | } 39 | ] 40 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-augmented-ai.json: -------------------------------------------------------------------------------- 1 | { 2 | "version":"0", 3 | "id":"12345678-1111-2222-3333-12345EXAMPLE", 4 | "detail-type":"SageMaker A2I HumanLoop Status Change", 5 | "source":"aws.sagemaker", 6 | "account":"1111111111111", 7 | "time":"2019-11-14T17:49:25Z", 8 | "region":"us-east-1", 9 | "resources":["arn:aws:sagemaker:us-east-1:111111111111:human-loop/humanloop-nov-14-1"], 10 | "detail":{ 11 | "creationTime":"2019-11-14T17:37:36.740Z", 12 | "failureCode":null, 13 | "failureReason":null, 14 | "flowDefinitionArn":"arn:aws:sagemaker:us-east-1:111111111111:flow-definition/flowdef-nov-12", 15 | "humanLoopArn":"arn:aws:sagemaker:us-east-1:111111111111:human-loop/humanloop-nov-14-1", 16 | "humanLoopName":"humanloop-nov-14-1", 17 | "humanLoopOutput":{ 18 | "outputS3Uri":"s3://customer-output-bucket-specified-in-flow-definition/flowdef-nov-12/2019/11/14/17/37/36/humanloop-nov-14-1/output.json" 19 | }, 20 | "humanLoopStatus":"Completed" 21 | } 22 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-chime-voice-connector-streaming-ends.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "12345678-1234-1234-1234-111122223333", 4 | "detail-type": "Chime VoiceConnector Streaming Status", 5 | "source": "aws.chime", 6 | "account": "111122223333", 7 | "time": "yyyy-mm-ddThh:mm:ssZ", 8 | "region": "us-east-1", 9 | "resources": [], 10 | "detail": { 11 | "streamingStatus": "ENDED", 12 | "voiceConnectorId": "abcdef1ghij2klmno3pqr4", 13 | "transactionId": "12345678-1234-1234", 14 | "callId": "1112-2222-4333", 15 | "direction": "Inbound", 16 | "fromNumber": "+12065550100", 17 | "inviteHeaders": { 18 | "from": "\"John\" ;tag=abcdefg", 19 | "to": "", 20 | "call-id": "1112-2222-4333", 21 | "cseq": "101 INVITE", 22 | "contact": "", 23 | "content-type": "application/sdp", 24 | "content-length": "246" 25 | }, 26 | "isCaller": false, 27 | "mediaType": "audio/L16", 28 | "sdp": { 29 | "mediaIndex": 0, 30 | "mediaLabel": "1" 31 | }, 32 | "siprecMetadata": "<&xml version=\"1.0\" encoding=\"UTF-8\"&>\r\n", 33 | "startFragmentNumber": "1234567899444", 34 | "startTime": "yyyy-mm-ddThh:mm:ssZ", 35 | "endTime": "yyyy-mm-ddThh:mm:ssZ", 36 | "streamArn": "arn:aws:kinesisvideo:us-east-1:123456:stream/ChimeVoiceConnector-abcdef1ghij2klmno3pqr4-111aaa-22bb-33cc-44dd-111222/111122223333", 37 | "toNumber": "+13605550199", 38 | "version": "0" 39 | } 40 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-chime-voice-connector-streaming-fails.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "12345678-1234-1234-1234-111122223333", 4 | "detail-type": "Chime VoiceConnector Streaming Status", 5 | "source": "aws.chime", 6 | "account": "111122223333", 7 | "time": "yyyy-mm-ddThh:mm:ssZ", 8 | "region": "us-east-1", 9 | "resources": [], 10 | "detail": { 11 | "streamingStatus":"FAILED", 12 | "voiceConnectorId":"abcdefghi", 13 | "transactionId":"12345678-1234-1234", 14 | "callId":"1112-2222-4333", 15 | "direction":"Inbound", 16 | "failTime":"yyyy-mm-ddThh:mm:ssZ", 17 | "failureReason": "Internal failure", 18 | "version":"0" 19 | } 20 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-chime-voice-connector-streaming-starts.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "12345678-1234-1234-1234-111122223333", 4 | "detail-type": "Chime VoiceConnector Streaming Status", 5 | "source": "aws.chime", 6 | "account": "111122223333", 7 | "time": "yyyy-mm-ddThh:mm:ssZ", 8 | "region": "us-east-1", 9 | "resources": [], 10 | "detail": { 11 | "callId": "1112-2222-4333", 12 | "direction": "Outbound", 13 | "fromNumber": "+12065550100", 14 | "inviteHeaders": { 15 | "from": "\"John\" ;tag=abcdefg", 16 | "to": "", 17 | "call-id": "1112-2222-4333", 18 | "cseq": "101 INVITE", 19 | "contact": ";", 20 | "content-type": "application/sdp", 21 | "content-length": "246" 22 | }, 23 | "isCaller": false, 24 | "mediaType": "audio/L16", 25 | "sdp": { 26 | "mediaIndex": 0, 27 | "mediaLabel": "1" 28 | }, 29 | "siprecMetadata": "<&xml version=\"1.0\" encoding=\"UTF-8\"&>;\r\n", 30 | "startFragmentNumber": "1234567899444", 31 | "startTime": "yyyy-mm-ddThh:mm:ssZ", 32 | "streamArn": "arn:aws:kinesisvideo:us-east-1:123456:stream/ChimeVoiceConnector-abcdef1ghij2klmno3pqr4-111aaa-22bb-33cc-44dd-111222/111122223333", 33 | "toNumber": "+13605550199", 34 | "transactionId": "12345678-1234-1234", 35 | "voiceConnectorId": "abcdef1ghij2klmno3pqr4", 36 | "streamingStatus": "STARTED", 37 | "version": "0" 38 | } 39 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-chime-voice-connector-streaming-updates.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "12345678-1234-1234-1234-111122223333", 4 | "detail-type": "Chime VoiceConnector Streaming Status", 5 | "source": "aws.chime", 6 | "account": "111122223333", 7 | "time": "yyyy-mm-ddThh:mm:ssZ", 8 | "region": "us-east-1", 9 | "resources": [], 10 | "detail": { 11 | "callId": "1112-2222-4333", 12 | "updateHeaders": { 13 | "from": "\"John\" ;;tag=abcdefg", 14 | "to": "", 15 | "call-id": "1112-2222-4333", 16 | "cseq": "101 INVITE", 17 | "contact": "", 18 | "content-type": "application/sdp", 19 | "content-length": "246" 20 | }, 21 | "siprecMetadata": "<&xml version=\"1.0\" encoding=\"UTF-8\"&>\r\n", 22 | "streamingStatus": "UPDATED", 23 | "transactionId": "12345678-1234-1234", 24 | "version": "0", 25 | "voiceConnectorId": "abcdef1ghij2klmno3pqr4" 26 | } 27 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-cloudwatch-anomaly-detection-alarm.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "daafc9f1-bddd-c6c9-83af-74971fcfc4ef", 4 | "detail-type": "CloudWatch Alarm State Change", 5 | "source": "aws.cloudwatch", 6 | "account": "123456789012", 7 | "time": "2019-10-03T16:00:04Z", 8 | "region": "us-east-1", 9 | "resources": ["arn:aws:cloudwatch:us-east-1:123456789012:alarm:EC2 CPU Utilization Anomaly"], 10 | "detail": { 11 | "alarmName": "EC2 CPU Utilization Anomaly", 12 | "state": { 13 | "value": "ALARM", 14 | "reason": "Thresholds Crossed: 1 out of the last 1 datapoints [0.0 (03/10/19 15:58:00)] was less than the lower thresholds [0.020599444741798756] or greater than the upper thresholds [0.3006915352732461] (minimum 1 datapoint for OK -> ALARM transition).", 15 | "reasonData": "{\"version\":\"1.0\",\"queryDate\":\"2019-10-03T16:00:04.650+0000\",\"startDate\":\"2019-10-03T15:58:00.000+0000\",\"period\":60,\"recentDatapoints\":[0.0],\"recentLowerThresholds\":[0.020599444741798756],\"recentUpperThresholds\":[0.3006915352732461]}", 16 | "timestamp": "2019-10-03T16:00:04.653+0000" 17 | }, 18 | "previousState": { 19 | "value": "OK", 20 | "reason": "Thresholds Crossed: 1 out of the last 1 datapoints [0.166666666664241 (03/10/19 15:57:00)] was not less than the lower thresholds [0.0206719426210418] or not greater than the upper thresholds [0.30076870222143803] (minimum 1 datapoint for ALARM -> OK transition).", 21 | "reasonData": "{\"version\":\"1.0\",\"queryDate\":\"2019-10-03T15:59:04.670+0000\",\"startDate\":\"2019-10-03T15:57:00.000+0000\",\"period\":60,\"recentDatapoints\":[0.166666666664241],\"recentLowerThresholds\":[0.0206719426210418],\"recentUpperThresholds\":[0.30076870222143803]}", 22 | "timestamp": "2019-10-03T15:59:04.672+0000" 23 | }, 24 | "configuration": { 25 | "description": "Goes into alarm if CPU Utilization is out of band", 26 | "metrics": [{ 27 | "id": "m1", 28 | "metricStat": { 29 | "metric": { 30 | "namespace": "AWS/EC2", 31 | "name": "CPUUtilization", 32 | "dimensions": { 33 | "InstanceId": "i-12345678901234567" 34 | } 35 | }, 36 | "period": 60, 37 | "stat": "Average" 38 | }, 39 | "returnData": true 40 | }, { 41 | "id": "ad1", 42 | "expression": "ANOMALY_DETECTION_BAND(m1, 0.8)", 43 | "label": "CPUUtilization (expected)", 44 | "returnData": true 45 | }] 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-cloudwatch-schuduled-event.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "53dc4d37-cffa-4f76-80c9-8b7d4a4d2eaa", 3 | "detail-type": "Scheduled Event", 4 | "source": "aws.events", 5 | "account": "123456789012", 6 | "time": "2019-10-08T16:53:06Z", 7 | "region": "us-east-1", 8 | "resources": [ "arn:aws:events:us-east-1:123456789012:rule/MyScheduledRule" ], 9 | "detail": {} 10 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-cloudwatch-single-metric-alarm.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "c4c1c1c9-6542-e61b-6ef0-8c4d36933a92", 4 | "detail-type": "CloudWatch Alarm State Change", 5 | "source": "aws.cloudwatch", 6 | "account": "123456789012", 7 | "time": "2019-10-02T17:04:40Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:cloudwatch:us-east-1:123456789012:alarm:ServerCpuTooHigh" 11 | ], 12 | "detail": { 13 | "alarmName": "ServerCpuTooHigh", 14 | "configuration": { 15 | "description": "Goes into alarm when server CPU utilization is too high!", 16 | "metrics": [ 17 | { 18 | "id": "30b6c6b2-a864-43a2-4877-c09a1afc3b87", 19 | "metricStat": { 20 | "metric": { 21 | "dimensions": { 22 | "InstanceId": "i-12345678901234567" 23 | }, 24 | "name": "CPUUtilization", 25 | "namespace": "AWS/EC2" 26 | }, 27 | "period": 300, 28 | "stat": "Average" 29 | }, 30 | "returnData": true 31 | } 32 | ] 33 | }, 34 | "previousState": { 35 | "reason": "Threshold Crossed: 1 out of the last 1 datapoints [0.0666851903306472 (01/10/19 13:46:00)] was not greater than the threshold (50.0) (minimum 1 datapoint for ALARM -> OK transition).", 36 | "reasonData": "{\"version\":\"1.0\",\"queryDate\":\"2019-10-01T13:56:40.985+0000\",\"startDate\":\"2019-10-01T13:46:00.000+0000\",\"statistic\":\"Average\",\"period\":300,\"recentDatapoints\":[0.0666851903306472],\"threshold\":50.0}", 37 | "timestamp": "2019-10-01T13:56:40.987+0000", 38 | "value": "OK" 39 | }, 40 | "state": { 41 | "reason": "Threshold Crossed: 1 out of the last 1 datapoints [99.50160229693434 (02/10/19 16:59:00)] was greater than the threshold (50.0) (minimum 1 datapoint for OK -> ALARM transition).", 42 | "reasonData": "{\"version\":\"1.0\",\"queryDate\":\"2019-10-02T17:04:40.985+0000\",\"startDate\":\"2019-10-02T16:59:00.000+0000\",\"statistic\":\"Average\",\"period\":300,\"recentDatapoints\":[99.50160229693434],\"threshold\":50.0}", 43 | "timestamp": "2019-10-02T17:04:40.989+0000", 44 | "value": "ALARM" 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-ec2-autoscale-instance-launch-lifecycle-action.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "12345678-1234-1234-1234-123456789012", 4 | "detail-type": "EC2 Instance-launch Lifecycle Action", 5 | "source": "aws.autoscaling", 6 | "account": "123456789012", 7 | "time": "yyyy-mm-ddThh:mm:ssZ", 8 | "region": "us-west-2", 9 | "resources": [ 10 | "auto-scaling-group-arn" 11 | ], 12 | "detail": { 13 | "LifecycleActionToken": "87654321-4321-4321-4321-210987654321", 14 | "AutoScalingGroupName": "my-asg", 15 | "LifecycleHookName": "my-lifecycle-hook", 16 | "EC2InstanceId": "i-1234567890abcdef0", 17 | "LifecycleTransition": "autoscaling:EC2_INSTANCE_LAUNCHING", 18 | "NotificationMetadata": "additional-info" 19 | } 20 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-ec2-autoscale-instance-launch-successful.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "12345678-1234-1234-1234-123456789012", 4 | "detail-type": "EC2 Instance Launch Successful", 5 | "source": "aws.autoscaling", 6 | "account": "123456789012", 7 | "time": "yyyy-mm-ddThh:mm:ssZ", 8 | "region": "us-west-2", 9 | "resources": [ 10 | "auto-scaling-group-arn", 11 | "instance-arn" 12 | ], 13 | "detail": { 14 | "StatusCode": "InProgress", 15 | "Description": "Launching a new EC2 instance: i-12345678", 16 | "AutoScalingGroupName": "my-auto-scaling-group", 17 | "ActivityId": "87654321-4321-4321-4321-210987654321", 18 | "Details": { 19 | "Availability Zone": "us-west-2b", 20 | "Subnet ID": "subnet-12345678" 21 | }, 22 | "RequestId": "12345678-1234-1234-1234-123456789012", 23 | "StatusMessage": "", 24 | "EndTime": "yyyy-mm-ddThh:mm:ssZ", 25 | "EC2InstanceId": "i-1234567890abcdef0", 26 | "StartTime": "yyyy-mm-ddThh:mm:ssZ", 27 | "Cause": "description-text" 28 | } 29 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-ec2-autoscale-instance-launch-unsuccessful.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "12345678-1234-1234-1234-123456789012", 4 | "detail-type": "EC2 Instance Launch Unsuccessful", 5 | "source": "aws.autoscaling", 6 | "account": "123456789012", 7 | "time": "yyyy-mm-ddThh:mm:ssZ", 8 | "region": "us-west-2", 9 | "resources": [ 10 | "auto-scaling-group-arn", 11 | "instance-arn" 12 | ], 13 | "detail": { 14 | "StatusCode": "Failed", 15 | "AutoScalingGroupName": "my-auto-scaling-group", 16 | "ActivityId": "87654321-4321-4321-4321-210987654321", 17 | "Details": { 18 | "Availability Zone": "us-west-2b", 19 | "Subnet ID": "subnet-12345678" 20 | }, 21 | "RequestId": "12345678-1234-1234-1234-123456789012", 22 | "StatusMessage": "message-text", 23 | "EndTime": "yyyy-mm-ddThh:mm:ssZ", 24 | "EC2InstanceId": "i-1234567890abcdef0", 25 | "StartTime": "yyyy-mm-ddThh:mm:ssZ", 26 | "Cause": "description-text" 27 | } 28 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-ec2-ebs-create-volume.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "01234567-0123-0123-0123-012345678901", 4 | "detail-type": "EBS Volume Notification", 5 | "source": "aws.ec2", 6 | "account": "012345678901", 7 | "time": "yyyy-mm-ddThh:mm:ssZ", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:ec2:us-east-1:012345678901:volume/vol-01234567" 11 | ], 12 | "detail": { 13 | "result": "available", 14 | "cause": "", 15 | "event": "createVolume", 16 | "request-id": "01234567-0123-0123-0123-0123456789ab" 17 | } 18 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-ec2-ebs-delete-volume.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "01234567-0123-0123-0123-012345678901", 4 | "detail-type": "EBS Volume Notification", 5 | "source": "aws.ec2", 6 | "account": "012345678901", 7 | "time": "yyyy-mm-ddThh:mm:ssZ", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:ec2:us-east-1:012345678901:volume/vol-01234567" 11 | ], 12 | "detail": { 13 | "result": "deleted", 14 | "cause": "", 15 | "event": "deleteVolume", 16 | "request-id": "01234567-0123-0123-0123-0123456789ab" 17 | } 18 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-ec2-state-change.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"7bf73129-1428-4cd3-a780-95db273d1602", 3 | "detail-type":"EC2 Instance State-change Notification", 4 | "source":"aws.ec2", 5 | "account":"123456789012", 6 | "time":"2019-11-11T21:29:54Z", 7 | "region":"us-east-1", 8 | "resources":[ 9 | "arn:aws:ec2:us-east-1:123456789012:instance/i-abcd1111" 10 | ], 11 | "detail":{ 12 | "instance-id":"i-abcd1111", 13 | "state":"pending" 14 | } 15 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-ecr-completed-image-delection.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "dd3b46cb-2c74-f49e-393b-28286b67279d", 4 | "detail-type": "ECR Image Action", 5 | "source": "aws.ecr", 6 | "account": "123456789012", 7 | "time": "2019-11-16T02:01:05Z", 8 | "region": "us-west-2", 9 | "resources": [], 10 | "detail": { 11 | "result": "SUCCESS", 12 | "repository-name": "my-repository-name", 13 | "image-digest": "sha256:7f5b2640fe6fb4f46592dfd3410c4a79dac4f89e4782432e0378abcd1234", 14 | "action-type": "DELETE", 15 | "image-tag": "latest" 16 | } 17 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-ecr-completed-image-scan-basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "85fc3613-e913-7fc4-a80c-a3753e4aa9ae", 4 | "detail-type": "ECR Image Scan", 5 | "source": "aws.ecr", 6 | "account": "123456789012", 7 | "time": "2019-10-29T02:36:48Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:ecr:us-east-1:123456789012:repository/my-repository-name" 11 | ], 12 | "detail": { 13 | "scan-status": "COMPLETE", 14 | "repository-name": "my-repository-name", 15 | "finding-severity-counts": { 16 | "CRITICAL": 10, 17 | "MEDIUM": 9 18 | }, 19 | "image-digest": "sha256:7f5b2640fe6fb4f46592dfd3410c4a79dac4f89e4782432e0378abcd1234", 20 | "image-tags": [] 21 | } 22 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-ecr-completed-image-scan-enhanced.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "0c18352a-a4d4-6853-ef53-0ab8638973bf", 4 | "detail-type": "ECR Scan Resource Change", 5 | "source": "aws.ecr", 6 | "account": "123456789012", 7 | "time": "2021-10-14T20:53:46Z", 8 | "region": "us-east-1", 9 | "resources": [], 10 | "detail": { 11 | "action-type": "SCAN_FREQUENCY_CHANGE", 12 | "repositories": [{ 13 | "repository-name": "repository-1", 14 | "repository-arn": "arn:aws:ecr:us-east-1:123456789012:repository/repository-1", 15 | "scan-frequency": "SCAN_ON_PUSH", 16 | "previous-scan-frequency": "MANUAL" 17 | }, 18 | { 19 | "repository-name": "repository-2", 20 | "repository-arn": "arn:aws:ecr:us-east-1:123456789012:repository/repository-2", 21 | "scan-frequency": "CONTINUOUS_SCAN", 22 | "previous-scan-frequency": "SCAN_ON_PUSH" 23 | }, 24 | { 25 | "repository-name": "repository-3", 26 | "repository-arn": "arn:aws:ecr:us-east-1:123456789012:repository/repository-3", 27 | "scan-frequency": "CONTINUOUS_SCAN", 28 | "previous-scan-frequency": "SCAN_ON_PUSH" 29 | } 30 | ], 31 | "resource-type": "REPOSITORY", 32 | "scan-type": "ENHANCED" 33 | } 34 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-ecr-completed-push.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "13cde686-328b-6117-af20-0e5566167482", 4 | "detail-type": "ECR Image Action", 5 | "source": "aws.ecr", 6 | "account": "123456789012", 7 | "time": "2019-11-16T01:54:34Z", 8 | "region": "us-west-2", 9 | "resources": [], 10 | "detail": { 11 | "result": "SUCCESS", 12 | "repository-name": "my-repository-name", 13 | "image-digest": "sha256:7f5b2640fe6fb4f46592dfd3410c4a79dac4f89e4782432e0378abcd1234", 14 | "action-type": "PUSH", 15 | "image-tag": "latest" 16 | } 17 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-s3.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "36eb8523-97d0-4518-b33d-ee3579ff19f0", 4 | "detail-type": "AWS API Call via CloudTrail", 5 | "source": "aws.s3", 6 | "account": "123456789012", 7 | "time": "2016-02-20T01:09:13Z", 8 | "region": "us-east-1", 9 | "resources": [], 10 | "detail": { 11 | "eventVersion": "1.03", 12 | "userIdentity": { 13 | "type": "Root", 14 | "principalId": "123456789012", 15 | "arn": "arn:aws:iam::123456789012:root", 16 | "accountId": "123456789012", 17 | "sessionContext": { 18 | "attributes": { 19 | "mfaAuthenticated": "false", 20 | "creationDate": "2016-02-20T01:05:59Z" 21 | } 22 | } 23 | }, 24 | "eventTime": "2016-02-20T01:09:13Z", 25 | "eventSource": "s3.amazonaws.com", 26 | "eventName": "CreateBucket", 27 | "awsRegion": "us-east-1", 28 | "sourceIPAddress": "100.100.100.100", 29 | "userAgent": "[S3Console/0.4]", 30 | "requestParameters": { 31 | "bucketName": "bucket-test-iad" 32 | }, 33 | "responseElements": null, 34 | "requestID": "9D767BCC3B4E7487", 35 | "eventID": "24ba271e-d595-4e66-a7fd-9c16cbf8abae", 36 | "eventType": "AwsApiCall" 37 | } 38 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/amazon-workspaces.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "64ca0eda-9751-dc55-c41a-1bd50b4fc9b7", 4 | "detail-type": "WorkSpaces Access", 5 | "source": "aws.workspaces", 6 | "account": "123456789012", 7 | "time": "2018-07-01T17:53:06Z", 8 | "region": "us-east-1", 9 | "resources": [], 10 | "detail": { 11 | "clientIpAddress": "192.0.2.3", 12 | "actionType": "successfulLogin", 13 | "workspacesClientProductName": "WorkSpaces Desktop client", 14 | "loginTime": "2018-07-01T17:52:51.595Z", 15 | "clientPlatform": "Windows", 16 | "directoryId": "domain/d-123456789", 17 | "workspaceId": "ws-xyskdga" 18 | } 19 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/application-auto-scaling-scaled-to-max.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "7bf73129-1428-4cd3-a780-95db273d1602", 4 | "detail-type": "Application Auto Scaling Scaling Activity State Change", 5 | "source": "aws.application-autoscaling", 6 | "account": "123456789012", 7 | "time": "2019-06-12T10:23:40Z", 8 | "region": "us-west-2", 9 | "resources": [], 10 | "detail": { 11 | "startTime": "2019-06-12T10:20:43Z", 12 | "endTime": "2019-06-12T10:23:40Z", 13 | "newDesiredCapacity": 8, 14 | "oldDesiredCapacity": 5, 15 | "minCapacity": 2, 16 | "maxCapacity": 8, 17 | "resourceId": "table/my-table", 18 | "scalableDimension": "dynamodb:table:WriteCapacityUnits", 19 | "serviceNamespace": "dynamodb", 20 | "statusCode": "Successful", 21 | "scaledToMax": true, 22 | "direction": "scale-out" 23 | } 24 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-batch-job-state-change.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "c8f9c4b5-76e5-d76a-f980-7011e206042b", 4 | "detail-type": "Batch Job State Change", 5 | "source": "aws.batch", 6 | "account": "123456789012", 7 | "time": "2022-01-11T23:36:40Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:batch:us-east-1:123456789012:job/4c7599ae-0a82-49aa-ba5a-4727fcce14a8" 11 | ], 12 | "detail": { 13 | "jobArn": "arn:aws:batch:us-east-1:123456789012:job/4c7599ae-0a82-49aa-ba5a-4727fcce14a8", 14 | "jobName": "event-test", 15 | "jobId": "4c7599ae-0a82-49aa-ba5a-4727fcce14a8", 16 | "jobQueue": "arn:aws:batch:us-east-1:123456789012:job-queue/PexjEHappyPathCanary2JobQueue", 17 | "status": "RUNNABLE", 18 | "attempts": [], 19 | "createdAt": 1641944200058, 20 | "retryStrategy": { 21 | "attempts": 2, 22 | "evaluateOnExit": [] 23 | }, 24 | "dependsOn": [], 25 | "jobDefinition": "arn:aws:batch:us-east-1:123456789012:job-definition/first-run-job-definition:1", 26 | "parameters": {}, 27 | "container": { 28 | "image": "137112412989.dkr.ecr.us-east-1.amazonaws.com/amazonlinux:latest", 29 | "command": [ 30 | "sleep", 31 | "600" 32 | ], 33 | "volumes": [], 34 | "environment": [], 35 | "mountPoints": [], 36 | "ulimits": [], 37 | "networkInterfaces": [], 38 | "resourceRequirements": [ 39 | { 40 | "value": "2", 41 | "type": "VCPU" 42 | }, { 43 | "value": "256", 44 | "type": "MEMORY" 45 | } 46 | ], 47 | "secrets": [] 48 | }, 49 | "tags": { 50 | "resourceArn": "arn:aws:batch:us-east-1:123456789012:job/4c7599ae-0a82-49aa-ba5a-4727fcce14a8" 51 | }, 52 | "propagateTags": false, 53 | "platformCapabilities": [] 54 | } 55 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-approvalRuleTemplateAssociatedWithRepository.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "ea1c6d73-EXAMPLE", 4 | "detail-type": "CodeCommit Approval Rule Template Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-06T19:02:27Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "approvalRuleTemplateContentSha256": "f742eebbEXAMPLE", 14 | "approvalRuleTemplateId": "d7385967-EXAMPLE", 15 | "approvalRuleTemplateName": "2-approvers-required-for-main", 16 | "callerUserArn": "arn:aws:iam::123456789012:user/Mary_Major", 17 | "creationDate": "Wed Nov 06 19:02:14 UTC 2019", 18 | "event": "approvalRuleTemplateAssociatedWithRepository", 19 | "lastModifiedDate": "Wed Nov 06 19:02:14 UTC 2019", 20 | "notificationBody": "A approval rule template event occurred in the following AWS CodeCommit account: 123456789012. User: arn:aws:iam::123456789012:user/Mary_Major. Additional information: An approval rule template has been associated with the following repository: [MyDemoRepo]. For more information, go to the AWS CodeCommit console.", 21 | "repositories": { 22 | "MyDemoRepo": "92ca7bf2-d878-49ed-a994-336a6cc7c574" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-approvalRuleTemplateBatchAssociatedWithRepositories.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "0f861e5b-EXAMPLE", 4 | "detail-type": "CodeCommit Approval Rule Template Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-12T23:39:09Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "approvalRuleTemplateContentSha256": "f742eebbEXAMPLE", 14 | "approvalRuleTemplateId": "c71c1fe0-EXAMPLE", 15 | "approvalRuleTemplateName": "2-approvers-required-for-main", 16 | "callerUserArn": "arn:aws:iam::123456789012:user/Mary_Major", 17 | "creationDate": "Tue Nov 12 23:38:57 UTC 2019", 18 | "event": "batchAssociateApprovalRuleTemplateWithRepositories", 19 | "lastModifiedDate": "Tue Nov 12 23:38:57 UTC 2019", 20 | "notificationBody": "A approval rule template event occurred in the following AWS CodeCommit account: 123456789012. User: arn:aws:iam::123456789012:userMary_Major. Additional information: An approval rule template has been batch associated with the following repository names: [MyDemoRepo, MyTestRepo]. For more information, go to the AWS CodeCommit console.", 21 | "repositories": { 22 | "MyDemoRepo": "MyTestRepo" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-approvalRuleTemplateBatchDisassociatedFromRepositories.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "e08fc996-EXAMPLE", 4 | "detail-type": "CodeCommit Approval Rule Template Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-12T23:39:09Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "approvalRuleTemplateContentSha256": "f742eebbEXAMPLE", 14 | "approvalRuleTemplateId": "c71c1fe0-ff91-4db4-9a45-a86a7b6c474f", 15 | "approvalRuleTemplateName": "2-approvers-required-for-main", 16 | "callerUserArn": "arn:aws:iam::123456789012:user/Mary_Major", 17 | "creationDate": "Tue Nov 12 23:38:57 UTC 2019", 18 | "event": "batchDisassociateApprovalRuleTemplateFromRepositories", 19 | "lastModifiedDate": "Tue Nov 12 23:38:57 UTC 2019", 20 | "notificationBody": "A approval rule template event occurred in the following AWS CodeCommit account: 123456789012. User: arn:aws:iam::123456789012:user/Mary_Major. Additional information: An approval rule template has been batch disassociated from the following repository names: [MyDemoRepo, MyTestRepo]. For more information, go to the AWS CodeCommit console.", 21 | "repositories": { 22 | "MyDemoRepo": "MyTestRepo" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-approvalRuleTemplateCreated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "f7702227-EXAMPLE", 4 | "detail-type": "CodeCommit Approval Rule Template Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-06T19:02:27Z", 8 | "region": "us-east-2", 9 | "resources": [], 10 | "detail": { 11 | "approvalRuleTemplateContentSha256": "f742eebbEXAMPLE", 12 | "approvalRuleTemplateId": "d7385967-EXAMPLE", 13 | "approvalRuleTemplateName": "2-approvers-required-for-main", 14 | "callerUserArn": "arn:aws:iam::123456789012:user/Mary_Major", 15 | "creationDate": "Wed Nov 06 19:02:14 UTC 2019", 16 | "event": "approvalRuleTemplateCreated", 17 | "lastModifiedDate": "Wed Nov 06 19:02:14 UTC 2019", 18 | "notificationBody": "A approval rule template event occurred in the following AWS CodeCommit account: 123456789012. User: arn:aws:iam::123456789012:user/Mary_Major. Additional information: An approval rule template with the following name has been created: 2-approvers-required-for-main. The ID of the created template is: d7385967-EXAMPLE. For more information, go to the AWS CodeCommit console.", 19 | "repositories": {} 20 | } 21 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-approvalRuleTemplateDeleted.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "66403118-EXAMPLE", 4 | "detail-type": "CodeCommit Approval Rule Template Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-12T23:03:30Z", 8 | "region": "us-east-2", 9 | "resources": [], 10 | "detail": { 11 | "approvalRuleTemplateContentSha256": "4f3de6632EXAMPLE", 12 | "approvalRuleTemplateId": "c9d2b844-EXAMPLE", 13 | "approvalRuleTemplateName": "2-approvers-required-for-main", 14 | "callerUserArn": "arn:aws:iam::123456789012:userMary_Major", 15 | "creationDate": "Tue Nov 12 23:03:06 UTC 2019", 16 | "event": "approvalRuleTemplateUpdated", 17 | "lastModifiedDate": "Tue Nov 12 23:03:20 UTC 2019", 18 | "notificationBody": "A approval rule template event occurred in the following AWS CodeCommit account: 123456789012. User: arn:aws:iam::123456789012:userMary_Major. Additional information: An approval rule template with the following name has been updated: 2-approvers-required-for-main. The ID of the updated template is: c9d2b844-EXAMPLE. The after rule template content SHA256 is 4f3de663EXAMPLE. For more information, go to the AWS CodeCommit console.", 19 | "repositories": {} 20 | } 21 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-approvalRuleTemplateDisassociatedWithRepository.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "ea1c6d73-EXAMPLE", 4 | "detail-type": "CodeCommit Approval Rule Template Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-06T19:02:27Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "approvalRuleTemplateContentSha256": "f742eebbEXAMPLE", 14 | "approvalRuleTemplateId": "d7385967-EXAMPLE", 15 | "approvalRuleTemplateName": "2-approvers-required-for-main", 16 | "callerUserArn": "arn:aws:iam::123456789012:user/Mary_Major", 17 | "creationDate": "Wed Nov 06 19:02:14 UTC 2019", 18 | "event": "approvalRuleTemplateDisassociatedFromRepository", 19 | "lastModifiedDate": "Wed Nov 06 19:02:14 UTC 2019", 20 | "notificationBody": "A approval rule template event occurred in the following AWS CodeCommit account: 123456789012. User: arn:aws:iam::123456789012:user/Mary_Major. Additional information: An approval rule template has been disassociated from the following repository: [MyDemoRepo]. For more information, go to the AWS CodeCommit console.", 21 | "repositories": { 22 | "MyDemoRepo": "92ca7bf2-d878-49ed-a994-336a6cc7c574" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-approvalRuleTemplateUpdated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "66403118-EXAMPLE", 4 | "detail-type": "CodeCommit Approval Rule Template Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-12T23:03:30Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | 11 | ], 12 | "detail": { 13 | "approvalRuleTemplateContentSha256": "f742eebbEXAMPLE", 14 | "approvalRuleTemplateId": "c9d2b844-EXAMPLE", 15 | "approvalRuleTemplateName": "2-approvers-required-for-main", 16 | "callerUserArn": "arn:aws:iam::123456789012:userMary_Major", 17 | "creationDate": "Tue Nov 12 23:03:06 UTC 2019", 18 | "event": "approvalRuleTemplateDeleted", 19 | "lastModifiedDate": "Tue Nov 12 23:03:20 UTC 2019", 20 | "notificationBody": "A approval rule template event occurred in the following AWS CodeCommit account: 123456789012. User: arn:aws:iam::123456789012:userMary_Major. Additional information: An approval rule template with the following name has been deleted: 2-approvers-required-for-main. The ID of the updated template is: c9d2b844-EXAMPLE. For more information, go to the AWS CodeCommit console.", 21 | "repositories": {} 22 | } 23 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-commentOnCommitCreated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "e9dce2e9-EXAMPLE", 4 | "detail-type": "CodeCommit Comment on Commit", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-09-29T20:20:39Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "beforeCommitId": "3c5dEXAMPLE", 14 | "repositoryId": "7dd1EXAMPLE...", 15 | "inReplyTo": "695bEXAMPLE...", 16 | "notificationBody": "A comment event occurred in the following repository: MyDemoRepo. The display name for the user is Mary Major. The email address for the user is mary_major@example.com. The user arn:aws:sts::123456789012:federated-user/Mary_Major made a comment. The comment was made on the following comment ID: 463bEXAMPLE.... For more information, go to the AWS CodeCommit console at https://us-east-2.console.aws.amazon.com/codecommit/home?region=us-east-2#/repository/MyDemoRepo/compare/3c5dEXAMPLE...f4d5EXAMPLE#463bEXAMPLE....", 17 | "commentId": "463bEXAMPLE...", 18 | "afterCommitId": "f4d5EXAMPLE", 19 | "event": "commentOnCommitCreated", 20 | "repositoryName": "MyDemoRepo", 21 | "callerUserArn": "arn:aws:sts::123456789012:federated-user/Mary_Major", 22 | "displayName": "Mary Major", 23 | "emailAddress": "mary_major@example.com" 24 | } 25 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-commentOnCommitUpdated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "98377d67-EXAMPLE", 4 | "detail-type": "CodeCommit Comment on Commit", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-02-09T07:15:16Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "afterCommitId": "53812581", 14 | "beforeCommitId": "03314446", 15 | "callerUserArn": "arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major", 16 | "commentId": "a7e5471e-EXAMPLE", 17 | "event": "commentOnCommitUpdated", 18 | "inReplyTo": "bdb07d47-EXAMPLE", 19 | "notificationBody": "A comment event occurred in the following AWS CodeCommit repository: MyDemoRepo. The display name for the user is Mary Major. The email address for the user is mary_major@example.com. The user arn:aws:sts::123456789012:federated-user/Mary_Major updated a comment or replied to a comment. The comment was made on the following comment ID: bdb07d47-6fe9-47b0-a839-b93cc743b2ac:468cd1cb-2dfb-4f68-9636-8de52431d1d6. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/compare/0331444646178429589969823096709582251768/.../5381258150293783361471680277136017291382?region\u003dus-east-2", 20 | "repositoryId": "12345678-1234-1234-1234-123456789012", 21 | "repositoryName": "MyDemoRepo", 22 | "displayName": "Mary Major", 23 | "emailAddress": "mary_major@example.com" 24 | } 25 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-commentOnPullRequestCreated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "98377d67-EXAMPLE", 4 | "detail-type": "CodeCommit Comment on Pull Request", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-02-09T07:15:16Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "beforeCommitId": "3c5dEXAMPLE", 14 | "repositoryId": "7dd1EXAMPLE...", 15 | "inReplyTo": "695bEXAMPLE...", 16 | "notificationBody": "A comment event occurred in the following AWS CodeCommit repository: MyDemoRepo. The display name for the user is Saanvi Sarkar. The email address for the user is saanvi_sarkar@example.com. The user arn:aws:sts::123456789012:federated-user/Saanvi_Sarkar made a comment. The comment was made on the following Pull Request: 201. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codecommit/home?region=us-east-2#/repository/MyDemoRepo/pull-request/201/activity#3276EXAMPLE...", 17 | "commentId": "463bEXAMPLE...", 18 | "afterCommitId": "f4d5EXAMPLE", 19 | "event": "commentOnPullRequestCreated", 20 | "repositoryName": "MyDemoRepo", 21 | "callerUserArn": "arn:aws:sts::123456789012:federated-user/Saanvi_Sarkar", 22 | "pullRequestId": "201", 23 | "displayName": "Saanvi Sarkar", 24 | "emailAddress": "saanvi_sarkar@example.com" 25 | } 26 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-commentOnPullRequestUpdated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "98377d67-EXAMPLE", 4 | "detail-type": "CodeCommit Comment on Pull Request", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-02-09T07:15:16Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "afterCommitId": "96814774EXAMPLE", 14 | "beforeCommitId": "6031971EXAMPLE", 15 | "callerUserArn": "arn:aws:sts::123456789012:federated-user/Saanvi_Sarkar", 16 | "commentId": "40cb52f0-EXAMPLE", 17 | "event": "commentOnPullRequestUpdated", 18 | "inReplyTo": "1285e713-EXAMPLE", 19 | "notificationBody": "A comment event occurred in the following AWS CodeCommit repository: MyDemoRepo. The display name for the user is Saanvi Sarkar. The email address for the user is saanvi_sarkar@example.com. The user arn:aws:sts::123456789012:federated-user/Saanvi_Sarkar updated a comment or replied to a comment. The comment was made on the following Pull Request: 1. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/pull-requests/1/activity#40cb52f0-aac7-4c43-b771-601eff02EXAMPLE", 20 | "pullRequestId": "1", 21 | "repositoryId": "12345678-1234-1234-1234-123456789012", 22 | "repositoryName": "MyDemoRepo" 23 | } 24 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-pullRequestApprovalRuleCreated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "ad860f12-EXAMPLE", 4 | "detail-type": "CodeCommit Pull Request State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-06T19:12:19Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "approvalRuleContentSha256": "f742eebbEXAMPLE", 14 | "approvalRuleId": "0a9b5dfc-EXAMPLE", 15 | "approvalRuleName": "1-approver-needed", 16 | "author": "arn:aws:iam::123456789012:user/Mary_Major", 17 | "callerUserArn": "arn:aws:iam::123456789012:user/Mary_Major", 18 | "creationDate": "Wed Nov 06 19:10:58 UTC 2019", 19 | "description": "An An example description.", 20 | "destinationCommit": "194fdf00EXAMPLE", 21 | "destinationReference": "refs/heads/main", 22 | "event": "pullRequestApprovalRuleCreated", 23 | "isMerged": "False", 24 | "lastModifiedDate": "Wed Nov 06 19:10:58 UTC 2019", 25 | "notificationBody": "A pull request event occurred in the following AWS CodeCommit repository: MyDemoRepo. User: arn:aws:iam::123456789012:user/Mary_Major. Event: Updated. Pull request: 227. Additional information: An approval rule has been created with the following name: 1-approver-needed. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/pull-requests/227?region=us-east-2", 26 | "pullRequestId": "227", 27 | "pullRequestStatus": "Open", 28 | "repositoryNames": [ 29 | "MyDemoRepo" 30 | ], 31 | "revisionId": "3b8cecab3EXAMPLE", 32 | "sourceCommit": "29964a17EXAMPLE", 33 | "sourceReference": "refs/heads/test-branch", 34 | "title": "My example pull request" 35 | } 36 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-pullRequestApprovalRuleDeleted.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "c1c3509d-EXAMPLE", 4 | "detail-type": "CodeCommit Pull Request State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-06T19:12:19Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "approvalRuleContentSha256": "f742eebbEXAMPLE", 14 | "approvalRuleId": "0a9b5dfc-EXAMPLE", 15 | "approvalRuleName": "1-approver-needed", 16 | "author": "arn:aws:iam::123456789012:user/Saanvi_Sarkar", 17 | "callerUserArn": "arn:aws:iam::123456789012:user/Mary_Major", 18 | "creationDate": "Wed Nov 06 19:10:58 UTC 2019", 19 | "description": "An An example description.", 20 | "destinationCommit": "194fdf00EXAMPLE", 21 | "destinationReference": "refs/heads/main", 22 | "event": "pullRequestApprovalRuleDeleted", 23 | "isMerged": "False", 24 | "lastModifiedDate": "Wed Nov 06 19:10:58 UTC 2019", 25 | "notificationBody": "A pull request event occurred in the following AWS CodeCommit repository: MyDemoRepo. User: arn:aws:iam::123456789012:user/Mary_Major. Event: Created. Pull request: 227. Additional information: An approval rule has been deleted: 1-approver-needed was deleted. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/pull-requests/227?region=us-east-2", 26 | "pullRequestId": "227", 27 | "pullRequestStatus": "Open", 28 | "repositoryNames": [ 29 | "MyDemoRepo" 30 | ], 31 | "revisionId": "3b8cecabEXAMPLE", 32 | "sourceCommit": "29964a17EXAMPLE", 33 | "sourceReference": "refs/heads/test-branch", 34 | "title": "My example pull request" 35 | } 36 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-pullRequestApprovalRuleOverridden.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "52d2cb73-EXAMPLE", 4 | "detail-type": "CodeCommit Pull Request State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-06T19:12:19Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "author": "arn:aws:iam::123456789012:user/Li_Juan", 14 | "callerUserArn": "arn:aws:iam::123456789012:user/Mary_Major", 15 | "creationDate": "Wed Nov 06 19:10:58 UTC 2019", 16 | "description": "An An example description.", 17 | "destinationCommit": "194fdf00EXAMPLE", 18 | "destinationReference": "refs/heads/main", 19 | "event": "pullRequestApprovalRuleOverridden", 20 | "isMerged": "False", 21 | "lastModifiedDate": "Wed Nov 06 19:10:58 UTC 2019", 22 | "notificationBody": "A pull request event occurred in the following AWS CodeCommit repository: MyDemoRepo. User: arn:aws:iam::123456789012:user/Mary_Major. Event: Updated. Pull request name: 227. Additional information: An override event has occurred for the approval rules for this pull request. Override status: OVERRIDE. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/pull-requests/227?region=us-east-2", 23 | "overrideStatus": "OVERRIDE", 24 | "pullRequestId": "227", 25 | "pullRequestStatus": "Open", 26 | "repositoryNames": [ 27 | "MyDemoRepo" 28 | ], 29 | "revisionId": "3b8cecabEXAMPLE", 30 | "sourceCommit": "29964a17EXAMPLE", 31 | "sourceReference": "refs/heads/test-branch", 32 | "title": "My example pull request" 33 | } 34 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-pullRequestApprovalRuleUpdated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "21b1c819-2889-3528-1cb8-3861aacf9d42", 4 | "detail-type": "CodeCommit Pull Request State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-06T19:12:19Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "approvalRuleContentSha256": "f742eebbEXAMPLE", 14 | "approvalRuleId": "0a9b5dfc-EXAMPLE", 15 | "approvalRuleName": "1-approver-needed", 16 | "author": "arn:aws:iam::123456789012:user/Mary_Major", 17 | "callerUserArn": "arn:aws:iam::123456789012:user/Mary_Major", 18 | "creationDate": "Wed Nov 06 19:10:58 UTC 2019", 19 | "description": "An example description.", 20 | "destinationCommit": "194fdf00EXAMPLE", 21 | "destinationReference": "refs/heads/main", 22 | "event": "pullRequestApprovalRuleUpdated", 23 | "isMerged": "False", 24 | "lastModifiedDate": "Wed Nov 06 19:10:58 UTC 2019", 25 | "notificationBody": "A pull request event occurred in the following AWS CodeCommit repository: MyDemoRepo. User: arn:aws:iam::123456789012:user/Mary_Major. Event: Updated. Pull request name: 227. The content of an approval rule has been updated for the pull request. The name of the updated rule is: 1-approver-needed. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/pull-requests/227?region=us-east-2", 26 | "pullRequestId": "227", 27 | "pullRequestStatus": "Open", 28 | "repositoryNames": [ 29 | "MyDemoRepo" 30 | ], 31 | "revisionId": "3b8cecab3EXAMPLE", 32 | "sourceCommit": "29964a17EXAMPLE", 33 | "sourceReference": "refs/heads/test-branch", 34 | "title": "My example pull request" 35 | } 36 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-pullRequestApprovalStateChanged.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "53e5d7e9-986c-1ebf-9d8b-ebef5596da0e", 4 | "detail-type": "CodeCommit Pull Request State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-11-06T19:12:19Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "approvalStatus": "APPROVE", 14 | "author": "arn:aws:iam::123456789012:user/Li_Juan", 15 | "callerUserArn": "arn:aws:iam::123456789012:user/Mary_Major", 16 | "creationDate": "Wed Nov 06 19:10:58 UTC 2019", 17 | "description": "An An example description.", 18 | "destinationCommit": "194fdf00EXAMPLE", 19 | "destinationReference": "refs/heads/main", 20 | "event": "pullRequestApprovalStateChanged", 21 | "isMerged": "False", 22 | "lastModifiedDate": "Wed Nov 06 19:10:58 UTC 2019", 23 | "notificationBody": "A pull request event occurred in the following AWS CodeCommit repository: MyDemoRepo. User: arn:aws:iam::123456789012:user/Mary_Major. Event: Updated. Pull request name: 227. Additional information: A user has changed their approval state for the pull request. State change: APPROVE. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/pull-requests/227?region=us-east-2", 24 | "pullRequestId": "227", 25 | "pullRequestStatus": "Open", 26 | "repositoryNames": [ 27 | "MyDemoRepo" 28 | ], 29 | "revisionId": "3b8cecabEXAMPLE", 30 | "sourceCommit": "29964a17EXAMPLE", 31 | "sourceReference": "refs/heads/test-branch", 32 | "title": "My example pull request" 33 | } 34 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-pullRequestCreated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "98377d67-EXAMPLE", 4 | "detail-type": "CodeCommit Pull Request State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-02-09T07:15:16Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "author": "arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major", 14 | "callerUserArn": "arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major", 15 | "creationDate": "Tue Feb 9 2019 10:18:42 PDT ", 16 | "description": "An example description.", 17 | "destinationCommit": "12241970EXAMPLE", 18 | "destinationReference": "refs/heads/main", 19 | "event": "pullRequestCreated", 20 | "isMerged": "False", 21 | "lastModifiedDate": "Tue Feb 9 2019 10:18:42 PDT", 22 | "notificationBody": "A pull request event occurred in the following AWS CodeCommit repository: MyDemoRepo. User: arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major. Event: Created. The pull request was created with the following information: Pull Request ID as 1 and title as My Example Pull Request. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/pull-requests/1", 23 | "pullRequestId": "1", 24 | "pullRequestStatus": "Open", 25 | "repositoryNames": ["MyDemoRepo"], 26 | "revisionId": "bdc0cb9bEXAMPLE", 27 | "sourceCommit": "2774290EXAMPLE", 28 | "sourceReference": "refs/heads/test-branch", 29 | "title": "My Example Pull Request" 30 | } 31 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-pullRequestMergeStatusUpdated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "01234567-0123-0123-0123-012345678901", 4 | "detail-type": "CodeCommit Pull Request State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-06-12T10:23:43Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "author": "arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major", 14 | "callerUserArn": "arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major", 15 | "creationDate": "Mon Mar 11 14:42:31 PDT 2019", 16 | "description": "An example description.", 17 | "destinationCommit": "4376719EXAMPLE", 18 | "destinationReference": "refs/heads/main", 19 | "event": "pullRequestMergeStatusUpdated", 20 | "isMerged": "True", 21 | "lastModifiedDate": "Mon Mar 11 14:42:31 PDT 2019", 22 | "mergeOption": "FAST_FORWARD_MERGE", 23 | "notificationBody": "A pull request event occurred in the following AWS CodeCommit repository: MyDemoRepo. arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major updated the following PullRequest 1. The pull request merge status has been updated. The status is merged. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/pull-requests/1?region\u003dus-east-2", 24 | "pullRequestId": "1", 25 | "pullRequestStatus": "Closed", 26 | "repositoryNames": ["MyDemoRepo"], 27 | "revisionId": "bdc0cb9beEXAMPLE", 28 | "sourceCommit": "0701696EXAMPLE", 29 | "sourceReference": "refs/heads/test-branch", 30 | "title": "My Example Pull Request" 31 | } 32 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-pullRequestSourceBranchUpdated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "98377d67-EXAMPLE", 4 | "detail-type": "CodeCommit Pull Request State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-02-09T07:15:16Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "author": "arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major", 14 | "callerUserArn": "arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major", 15 | "creationDate": "Tue Feb 9 2019 10:18:42 PDT", 16 | "description": "An example description.", 17 | "destinationCommit": "7644990EXAMPLE", 18 | "destinationReference": "refs/heads/main", 19 | "event": "pullRequestSourceBranchUpdated", 20 | "isMerged": "False", 21 | "lastModifiedDate": "Tue Feb 9 2019 10:18:42 PDT", 22 | "notificationBody": "A pull request event occurred in the following AWS CodeCommit repository: MyDemoRepo. User: arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major. Event: Updated. The user updated the following pull request: 1. The pull request was updated with one or more commits to the source branch: test-branch. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/pull-requests/1?region\u003dus-east-2", 23 | "pullRequestId": "1", 24 | "pullRequestStatus": "Open", 25 | "repositoryNames": ["MyDemoRepo"], 26 | "revisionId": "bdc0cb9b4EXAMPLE", 27 | "sourceCommit": "64875001EXAMPLE", 28 | "sourceReference": "refs/heads/test-branch", 29 | "title": "My Example Pull Request" 30 | } 31 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-pullRequestStatusChanged.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "98377d67-EXAMPLE", 4 | "detail-type": "CodeCommit Pull Request State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-02-09T07:15:16Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "author": "arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major", 14 | "callerUserArn": "arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major", 15 | "creationDate": "Tue Jun 18 10:34:20 PDT 2019", 16 | "description": "An example description.", 17 | "destinationCommit": "95149731EXAMPLE", 18 | "destinationReference": "refs/heads/main", 19 | "event": "pullRequestStatusChanged", 20 | "isMerged": "False", 21 | "lastModifiedDate": "Tue Jun 18 10:34:20 PDT 2019", 22 | "notificationBody": "A pull request event occurred in the following AWS CodeCommit repository: MyDemoRepo. arn:aws:sts::123456789012:assumed-role/Admin/Mary_Major updated the following PullRequest 1. The pull request status has been updated. The status is closed. For more information, go to the AWS CodeCommit console https://us-east-2.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/pull-requests/1?region\u003dus-east-2", 23 | "pullRequestId": "1", 24 | "pullRequestStatus": "Closed", 25 | "repositoryNames": ["MyDemoRepo"], 26 | "revisionId": "bdc0cb9bEXAMPLE", 27 | "sourceCommit": "4409936EXAMPLE", 28 | "sourceReference": "refs/heads/test-branch", 29 | "title": "My Example Pull Request" 30 | } 31 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-reactionCreated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version":"0", 3 | "id":"59fcccd8-217a-32ce-2b05-561ed68a1c42", 4 | "detail-type":"CodeCommit Comment Reaction Change", 5 | "source":"aws.codecommit", 6 | "account":"123456789012", 7 | "time":"2020-04-14T00:49:03Z", 8 | "region":"us-east-2", 9 | "resources":[ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail":{ 13 | "callerUserArn":"arn:aws:iam::123456789012:user/Mary_Major", 14 | "commentId":"28930161-EXAMPLE", 15 | "event":"commentReactionCreated", 16 | "notificationBody":"A comment reaction event occurred in the following AWS CodeCommit Repository: MyDemoRepo. The user: arn:aws:iam::123456789012:user/Mary_Major made a comment reaction 👎 to the comment with comment ID: 28930161-EXAMPLE", 17 | "reactionEmojis":["👎"], 18 | "reactionShortcodes":[":thumbsdown:"], 19 | "reactionUnicodes":["U+1F44E"], 20 | "repositoryId":"12345678-1234-5678-abcd-12345678abcd", 21 | "repositoryName":"MyDemoRepo" 22 | } 23 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-reactionUpdated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version":"0", 3 | "id":"0844ed99-a53f-3bdb-6048-4de315516889", 4 | "detail-type":"CodeCommit Comment Reaction Change", 5 | "source":"aws.codecommit", 6 | "account":"123456789012", 7 | "time":"2020-04-22T23:19:42Z", 8 | "region":"us-east-2", 9 | "resources":[ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail":{ 13 | "callerUserArn":"arn:aws:iam::123456789012:user/Mary_Major", 14 | "commentId":"28930161-EXAMPLE", 15 | "event":"commentReactionUpdated", 16 | "notificationBody":"A comment reaction event occurred in the following AWS CodeCommit Repository: MyDemoRepo. The user: arn:aws:iam::123456789012:user/Mary_Major updated a reaction :smile: to the comment with comment ID: 28930161-EXAMPLE", 17 | "reactionEmojis":[ 18 | "😄" 19 | ], 20 | "reactionShortcodes":[ 21 | ":smile:" 22 | ], 23 | "reactionUnicodes":[ 24 | "U+1F604" 25 | ], 26 | "repositoryId":"12345678-1234-5678-abcd-12345678abcd", 27 | "repositoryName":"MyDemoRepo" 28 | } 29 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-referenceCreated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "01234567-EXAMPLE", 4 | "detail-type": "CodeCommit Repository State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-06-12T10:23:43Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "event": "referenceCreated", 14 | "repositoryName": "MyDemoRepo", 15 | "repositoryId": "12345678-1234-5678-abcd-12345678abcd", 16 | "referenceType": "branch", 17 | "referenceName": "myBranch", 18 | "referenceFullName": "refs/heads/myBranch", 19 | "commitId": "3e5983DESTINATION" 20 | } 21 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-referenceDeleted.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "01234567-EXAMPLE", 4 | "detail-type": "CodeCommit Repository State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-06-12T10:23:43Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "event": "referenceDeleted", 14 | "repositoryName": "MyDemoRepo", 15 | "repositoryId": "12345678-1234-5678-abcd-12345678abcd", 16 | "referenceType": "branch", 17 | "referenceName": "myBranch", 18 | "referenceFullName": "refs/heads/myBranch", 19 | "oldCommitId": "26a8f2EXAMPLE" 20 | } 21 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-referenceUpdated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "01234567-EXAMPLE", 4 | "detail-type": "CodeCommit Repository State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-06-12T10:23:43Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "event": "referenceUpdated", 14 | "repositoryName": "MyDemoRepo", 15 | "repositoryId": "12345678-1234-5678-abcd-12345678abcd", 16 | "referenceType": "branch", 17 | "referenceName": "myBranch", 18 | "referenceFullName": "refs/heads/myBranch", 19 | "commitId": "7f0103fMERGE", 20 | "oldCommitId": "3e5983DESTINATION", 21 | "baseCommitId": "3e5a9bf1BASE", 22 | "sourceCommitId": "26a8f2SOURCE", 23 | "destinationCommitId": "3e5983DESTINATION", 24 | "mergeOption": "THREE_WAY_MERGE", 25 | "conflictDetailsLevel": "LINE_LEVEL", 26 | "conflictResolutionStrategy": "AUTOMERGE" 27 | } 28 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codecommit-unreferencedMergeCommitCreated.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "01234567-EXAMPLE", 4 | "detail-type": "CodeCommit Repository State Change", 5 | "source": "aws.codecommit", 6 | "account": "123456789012", 7 | "time": "2019-06-12T10:23:43Z", 8 | "region": "us-east-2", 9 | "resources": [ 10 | "arn:aws:codecommit:us-east-2:123456789012:MyDemoRepo" 11 | ], 12 | "detail": { 13 | "event": "unreferencedMergeCommitCreated", 14 | "repositoryName": "MyDemoRepo", 15 | "repositoryId": "12345678-1234-5678-abcd-12345678abcd", 16 | "commitId": "7f0103fMERGE", 17 | "baseCommitId": "3e5a9bf1BASE", 18 | "sourceCommitId": "26a8f2SOURCE", 19 | "destinationCommitId": "3e5983DESTINATION", 20 | "mergeOption": "SQUASH_MERGE", 21 | "conflictDetailsLevel": "LINE_LEVEL", 22 | "conflictResolutionStrategy": "AUTOMERGE" 23 | } 24 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codedeploy-deployment-state-change.json: -------------------------------------------------------------------------------- 1 | { 2 | "account": "123456789012", 3 | "region": "us-east-1", 4 | "detail-type": "CodeDeploy Deployment State-change Notification", 5 | "source": "aws.codedeploy", 6 | "version": "0", 7 | "time": "2016-06-30T22:06:31Z", 8 | "id": "c071bfbf-83c4-49ca-a6ff-3df053957145", 9 | "resources": [ 10 | "arn:aws:codedeploy:us-east-1:123456789012:application:myApplication", 11 | "arn:aws:codedeploy:us-east-1:123456789012:deploymentgroup:myApplication/myDeploymentGroup" 12 | ], 13 | "detail": { 14 | "instanceGroupId": "9fd2fbef-2157-40d8-91e7-6845af69e2d2", 15 | "region": "us-east-1", 16 | "application": "myApplication", 17 | "deploymentId": "d-123456789", 18 | "state": "SUCCESS", 19 | "deploymentGroup": "myDeploymentGroup" 20 | } 21 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codedeploy-instance-state-change.json: -------------------------------------------------------------------------------- 1 | { 2 | "account": "123456789012", 3 | "region": "us-east-1", 4 | "detail-type": "CodeDeploy Instance State-change Notification", 5 | "source": "aws.codedeploy", 6 | "version": "0", 7 | "time": "2016-06-30T23:18:50Z", 8 | "id": "fb1d3015-c091-4bf9-95e2-d98521ab2ecb", 9 | "resources": [ 10 | "arn:aws:ec2:us-east-1:123456789012:instance/i-0000000aaaaaaaaaa", 11 | "arn:aws:codedeploy:us-east-1:123456789012:deploymentgroup:myApplication/myDeploymentGroup", 12 | "arn:aws:codedeploy:us-east-1:123456789012:application:myApplication" 13 | ], 14 | "detail": { 15 | "instanceId": "i-0000000aaaaaaaaaa", 16 | "region": "us-east-1", 17 | "state": "SUCCESS", 18 | "application": "myApplication", 19 | "deploymentId": "d-123456789", 20 | "instanceGroupId": "8cd3bfa8-9e72-4cbe-a1e5-da4efc7efd49", 21 | "deploymentGroup": "myDeploymentGroup" 22 | } 23 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codepipeline-execution-state-change.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "CWE-event-id", 4 | "detail-type": "CodePipeline Pipeline Execution State Change", 5 | "source": "aws.codepipeline", 6 | "account": "123456789012", 7 | "time": "2017-04-22T03:31:47Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:codepipeline:us-east-1:123456789012:pipeline:myPipeline" 11 | ], 12 | "detail": { 13 | "pipeline": "myPipeline", 14 | "version": "1", 15 | "state": "STARTED", 16 | "execution-id": "01234567-0123-0123-0123-012345678901" 17 | } 18 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codepipeline-stage-action-execution-state-change.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "CWE-event-id", 4 | "detail-type": "CodePipeline Action Execution State Change", 5 | "source": "aws.codepipeline", 6 | "account": "123456789012", 7 | "time": "2017-04-22T03:31:47Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:codepipeline:us-east-1:123456789012:pipeline:myPipeline" 11 | ], 12 | "detail": { 13 | "pipeline": "myPipeline", 14 | "version": 1, 15 | "execution-id": "01234567-0123-0123-0123-012345678901", 16 | "stage": "Prod", 17 | "action": "myAction", 18 | "state": "STARTED", 19 | "region":"us-west-2", 20 | "type": { 21 | "owner": "AWS", 22 | "category": "Deploy", 23 | "provider": "CodeDeploy", 24 | "version": 1 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-codepipeline-stage-execution-state-change.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "CWE-event-id", 4 | "detail-type": "CodePipeline Stage Execution State Change", 5 | "source": "aws.codepipeline", 6 | "account": "123456789012", 7 | "time": "2017-04-22T03:31:47Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:codepipeline:us-east-1:123456789012:pipeline:myPipeline" 11 | ], 12 | "detail": { 13 | "pipeline": "myPipeline", 14 | "version": "1", 15 | "execution-id": "01234567-0123-0123-0123-012345678901", 16 | "stage": "Prod", 17 | "state": "STARTED" 18 | } 19 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "...", 4 | "detail-type": "Config Rules Compliance Change", 5 | "source": "aws.config", 6 | "account": "...", 7 | "time": "2019-08-13T13:17:14Z", 8 | "region": "eu-central-1", 9 | "resources": [], 10 | "detail": { 11 | "resourceId": "terraform-20190813125905278500000001", 12 | "awsRegion": "eu-central-1", 13 | "awsAccountId": "...", 14 | "configRuleName": "config-rule-f6815e21a2b9a86e", 15 | "recordVersion": "1.0", 16 | "configRuleARN": "...", 17 | "messageType": "ComplianceChangeNotification", 18 | "newEvaluationResult": { 19 | "evaluationResultIdentifier": { 20 | "evaluationResultQualifier": { 21 | "configRuleName": "config-rule-f6815e21a2b9a86e", 22 | "resourceType": "AWS::S3::Bucket", 23 | "resourceId": "terraform-20190813125905278500000001" 24 | }, 25 | "orderingTimestamp": "2019-08-13T13:16:58.303Z" 26 | }, 27 | "complianceType": "COMPLIANT", 28 | "resultRecordedTime": "2019-08-13T13:17:13.829Z", 29 | "configRuleInvokedTime": "2019-08-13T13:17:13.653Z" 30 | }, 31 | "oldEvaluationResult": { 32 | "evaluationResultIdentifier": { 33 | "evaluationResultQualifier": { 34 | "configRuleName": "config-rule-f6815e21a2b9a86e", 35 | "resourceType": "AWS::S3::Bucket", 36 | "resourceId": "terraform-20190813125905278500000001" 37 | }, 38 | "orderingTimestamp": "2019-08-13T13:04:23.345Z" 39 | }, 40 | "complianceType": "NON_COMPLIANT", 41 | "resultRecordedTime": "2019-08-13T13:04:38.860Z", 42 | "configRuleInvokedTime": "2019-08-13T13:04:38.689Z" 43 | }, 44 | "notificationCreationTime": "2019-08-13T13:17:14.527Z", 45 | "resourceType": "AWS::S3::Bucket" 46 | } 47 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-step-function-execution-aborted.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "315c1398-40ff-a850-213b-158f73e60175", 4 | "detail-type": "Step Functions Execution Status Change", 5 | "source": "aws.states", 6 | "account": "012345678912", 7 | "time": "2019-02-26T19:42:21Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:states:us-east-1:012345678912:execution:state-machine-name:execution-name" 11 | ], 12 | "detail": { 13 | "executionArn": "arn:aws:states:us-east-1:012345678912:execution:state-machine-name:execution-name", 14 | "stateMachineArn": "arn:aws:states:us-east-1:012345678912:stateMachine:state-machine", 15 | "name": "execution-name", 16 | "status": "ABORTED", 17 | "startDate": 1551225014968, 18 | "stopDate": 1551225017576, 19 | "input": "{}", 20 | "inputDetails": { 21 | "included": true 22 | }, 23 | "output": null, 24 | "outputDetails": null 25 | } 26 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-step-function-execution-failed.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "315c1398-40ff-a850-213b-158f73e60175", 4 | "detail-type": "Step Functions Execution Status Change", 5 | "source": "aws.states", 6 | "account": "012345678912", 7 | "time": "2019-02-26T19:42:21Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:states:us-east-1:012345678912:execution:state-machine-name:execution-name" 11 | ], 12 | "detail": { 13 | "executionArn": "arn:aws:states:us-east-1:012345678912:execution:state-machine-name:execution-name", 14 | "stateMachineArn": "arn:aws:states:us-east-1:012345678912:stateMachine:state-machine", 15 | "name": "execution-name", 16 | "status": "FAILED", 17 | "startDate": 1551225146847, 18 | "stopDate": 1551225151881, 19 | "input": "{}", 20 | "inputDetails": { 21 | "included": true 22 | }, 23 | "output": null, 24 | "outputDetails": null 25 | } 26 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-step-function-execution-started.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "315c1398-40ff-a850-213b-158f73e60175", 4 | "detail-type": "Step Functions Execution Status Change", 5 | "source": "aws.states", 6 | "account": "012345678912", 7 | "time": "2019-02-26T19:42:21Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:states:us-east-1:012345678912:execution:state-machine-name:execution-name" 11 | ], 12 | "detail": { 13 | "executionArn": "arn:aws:states:us-east-1:012345678912:execution:state-machine-name:execution-name", 14 | "stateMachineArn": "arn:aws:states:us-east-1:012345678912:stateMachine:state-machine", 15 | "name": "execution-name", 16 | "status": "RUNNING", 17 | "startDate": 1551225271984, 18 | "stopDate": null, 19 | "input": "{}", 20 | "inputDetails": { 21 | "included": true 22 | }, 23 | "output": null, 24 | "outputDetails": null 25 | } 26 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-step-function-execution-suceeded.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "315c1398-40ff-a850-213b-158f73e60175", 4 | "detail-type": "Step Functions Execution Status Change", 5 | "source": "aws.states", 6 | "account": "012345678912", 7 | "time": "2019-02-26T19:42:21Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:states:us-east-1:012345678912:execution:state-machine-name:execution-name" 11 | ], 12 | "detail": { 13 | "executionArn": "arn:aws:states:us-east-1:012345678912:execution:state-machine-name:execution-name", 14 | "stateMachineArn": "arn:aws:states:us-east-1:012345678912:stateMachine:state-machine", 15 | "name": "execution-name", 16 | "status": "SUCCEEDED", 17 | "startDate": 1547148840101, 18 | "stopDate": 1547148840122, 19 | "input": "{}", 20 | "inputDetails": { 21 | "included": true 22 | }, 23 | "output": "\"Hello World!\"", 24 | "outputDetails": { 25 | "included": true 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-step-function-execution-timed-out.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "315c1398-40ff-a850-213b-158f73e60175", 4 | "detail-type": "Step Functions Execution Status Change", 5 | "source": "aws.states", 6 | "account": "012345678912", 7 | "time": "2019-02-26T19:42:21Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:states:us-east-1:012345678912:execution:state-machine-name:execution-name" 11 | ], 12 | "detail": { 13 | "executionArn": "arn:aws:states:us-east-1:012345678912:execution:state-machine-name:execution-name", 14 | "stateMachineArn": "arn:aws:states:us-east-1:012345678912:stateMachine:state-machine", 15 | "name": "execution-name", 16 | "status": "TIMED_OUT", 17 | "startDate": 1551224926156, 18 | "stopDate": 1551224927157, 19 | "input": "{}", 20 | "inputDetails": { 21 | "included": true 22 | }, 23 | "output": null, 24 | "outputDetails": null 25 | } 26 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-trusted-advisor-exposed-access-key.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "1234abcd-ab12-123a-123a-1234567890ab", 4 | "detail-type": "Trusted Advisor Check Item Refresh Notification", 5 | "source": "aws.trustedadvisor", 6 | "account": "123456789012", 7 | "time": "2018-01-12T19:38:24Z", 8 | "region": "us-east-1", 9 | "resources": [], 10 | "detail": { 11 | "check-name": "Exposed Access Keys", 12 | "check-item-detail": { 13 | "Case ID": "12345678-1234-1234-abcd-1234567890ab", 14 | "Usage (USD per Day)": "0", 15 | "User Name (IAM or Root)": "my-username", 16 | "Deadline": "1440453299248", 17 | "Access Key ID": "AKIAIOSFODNN7EXAMPLE", 18 | "Time Updated": "1440021299248", 19 | "Fraud Type": "Exposed", 20 | "Location": "www.example.com" 21 | }, 22 | "status": "ERROR", 23 | "resource_id": "", 24 | "uuid": "aa12345f-55c7-498e-b7ac-123456789012" 25 | } 26 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-trusted-advisor-load-balancer-optimization.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "1234abcd-ab12-123a-123a-1234567890ab", 4 | "detail-type": "Trusted Advisor Check Item Refresh Notification", 5 | "source": "aws.trustedadvisor", 6 | "account": "123456789012", 7 | "time": "2018-01-12T20:07:03Z", 8 | "region": "us-east-2", 9 | "resources": [], 10 | "detail": { 11 | "check-name": "Load Balancer Optimization ", 12 | "check-item-detail": { 13 | "Instances in Zone a": "1", 14 | "Status": "Yellow", 15 | "Instances in Zone b": "0", 16 | "# of Zones": "2", 17 | "Region": "eu-central-1", 18 | "Load Balancer Name": "my-load-balance", 19 | "Instances in Zone e": null, 20 | "Instances in Zone c": null, 21 | "Reason": "Single AZ", 22 | "Instances in Zone d": null 23 | }, 24 | "status": "WARN", 25 | "resource_id": "arn:aws:elasticloadbalancing:eu-central-1:123456789012:loadbalancer/my-load-balancer", 26 | "uuid": "aa12345f-55c7-498e-b7ac-123456789012" 27 | } 28 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/aws-trusted-advisor-low-utilization-amazon-ec2-instances.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "1234abcd-ab12-123a-123a-1234567890ab", 4 | "detail-type": "Trusted Advisor Check Item Refresh Notification", 5 | "source": "aws.trustedadvisor", 6 | "account": "123456789012", 7 | "time": "2018-01-12T20:07:49Z", 8 | "region": "us-east-2", 9 | "resources": [], 10 | "detail": { 11 | "check-name": "Low Utilization Amazon EC2 Instances", 12 | "check-item-detail": { 13 | "Day 1": "0.1% 0.00MB", 14 | "Day 2": "0.1% 0.00MB", 15 | "Day 3": "0.1% 0.00MB", 16 | "Region/AZ": "ca-central-1a", 17 | "Estimated Monthly Savings": "$9.22", 18 | "14-Day Average CPU Utilization": "0.1%", 19 | "Day 14": "0.1% 0.00MB", 20 | "Day 13": "0.1% 0.00MB", 21 | "Day 12": "0.1% 0.00MB", 22 | "Day 11": "0.1% 0.00MB", 23 | "Day 10": "0.1% 0.00MB", 24 | "14-Day Average Network I/O": "0.00MB", 25 | "Number of Days Low Utilization": "14 days", 26 | "Instance Type": "t2.micro", 27 | "Instance ID": "i-01234567890abcdef", 28 | "Day 8": "0.1% 0.00MB", 29 | "Instance Name": null, 30 | "Day 9": "0.1% 0.00MB", 31 | "Day 4": "0.1% 0.00MB", 32 | "Day 5": "0.1% 0.00MB", 33 | "Day 6": "0.1% 0.00MB", 34 | "Day 7": "0.1% 0.00MB" 35 | }, 36 | "status": "WARN", 37 | "resource_id": "arn:aws:ec2:ca-central-1:123456789012:instance/i-01234567890abcdef", 38 | "uuid": "aa12345f-55c7-498e-b7ac-123456789012" 39 | } 40 | } -------------------------------------------------------------------------------- /docs/events/cloudwatch-events/tag-change.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0", 3 | "id": "ffd8a6fe-32f8-ef66-c85c-111111111111", 4 | "detail-type": "Tag Change on Resource", 5 | "source": "aws.tag", 6 | "account": "123456789012", 7 | "time": "2018-09-18T20:41:06Z", 8 | "region": "us-east-1", 9 | "resources": [ 10 | "arn:aws:ec2:us-east-1:123456789012:instance/i-0000000aaaaaaaaaa" 11 | ], 12 | "detail": { 13 | "changed-tag-keys": [ 14 | "key2", 15 | "key3" 16 | ], 17 | "service": "ec2", 18 | "resource-type": "instance", 19 | "version": 5, 20 | "tags": { 21 | "key4": "value4", 22 | "key1": "value1", 23 | "key2": "value2" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /docs/events/cloudwatch-logs/cloudwatch-logs.json: -------------------------------------------------------------------------------- 1 | { 2 | "awslogs": { 3 | "data": "H4sIAAAAAAAAAHWPwQqCQBCGX0Xm7EFtK+smZBEUgXoLCdMhFtKV3akI8d0bLYmibvPPN3wz00CJxmQnTO41whwWQRIctmEcB6sQbFC3CjW3XW8kxpOpP+OC22d1Wml1qZkQGtoMsScxaczKN3plG8zlaHIta5KqWsozoTYw3/djzwhpLwivWFGHGpAFe7DL68JlBUk+l7KSN7tCOEJ4M3/qOI49vMHj+zCKdlFqLaU2ZHV2a4Ct/an0/ivdX8oYc1UVX860fQDQiMdxRQEAAA==" 4 | } 5 | } -------------------------------------------------------------------------------- /docs/events/code-commit/code-commit.json: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "awsRegion": "us-east-2", 5 | "codecommit": { 6 | "references": [ 7 | { 8 | "commit": "5e493c6f3067653f3d04eca608b4901eb227078", 9 | "ref": "refs/heads/master" 10 | } 11 | ] 12 | }, 13 | "eventId": "31ade2c7-f889-47c5-a937-1cf99e2790e9", 14 | "eventName": "ReferenceChanges", 15 | "eventPartNumber": 1, 16 | "eventSource": "aws:codecommit", 17 | "eventSourceARN": "arn:aws:codecommit:us-east-2:123456789012:lambda-pipeline-repo", 18 | "eventTime": "2019-03-12T20:58:25.400+0000", 19 | "eventTotalParts": 1, 20 | "eventTriggerConfigId": "0d17d6a4-efeb-46f3-b3ab-a63741badeb8", 21 | "eventTriggerName": "index.handler", 22 | "eventVersion": "1.0", 23 | "userIdentityARN": "arn:aws:iam::123456789012:user/intern" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /docs/events/code-pipeline-job/code-pipeline-job.json: -------------------------------------------------------------------------------- 1 | { 2 | "CodePipeline.job": { 3 | "id": "c0d76431-b0e7-xmpl-97e3-e8ee786eb6f6", 4 | "accountId": "123456789012", 5 | "data": { 6 | "actionConfiguration": { 7 | "configuration": { 8 | "FunctionName": "my-function", 9 | "UserParameters": "{\"KEY\": \"VALUE\"}" 10 | } 11 | }, 12 | "inputArtifacts": [ 13 | { 14 | "name": "my-pipeline-SourceArtifact", 15 | "revision": "e0c7xmpl2308ca3071aa7bab414de234ab52eea", 16 | "location": { 17 | "type": "S3", 18 | "s3Location": { 19 | "bucketName": "us-west-2-123456789012-my-pipeline", 20 | "objectKey": "my-pipeline/test-api-2/TdOSFRV" 21 | } 22 | } 23 | } 24 | ], 25 | "outputArtifacts": [ 26 | { 27 | "name": "invokeOutput", 28 | "revision": null, 29 | "location": { 30 | "type": "S3", 31 | "s3Location": { 32 | "bucketName": "us-west-2-123456789012-my-pipeline", 33 | "objectKey": "my-pipeline/invokeOutp/D0YHsJn" 34 | } 35 | } 36 | } 37 | ], 38 | "artifactCredentials": { 39 | "accessKeyId": "AKIAIOSFODNN7EXAMPLE", 40 | "secretAccessKey": "6CGtmAa3lzWtV7a...", 41 | "sessionToken": "IQoJb3JpZ2luX2VjEA...", 42 | "expirationTime": 1575493418000 43 | } 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /docs/events/cognito-events/cognito-event.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "eventType": "SyncTrigger", 4 | "region": "us-east-1", 5 | "identityPoolId": "identityPoolId", 6 | "identityId": "identityId", 7 | "datasetName": "datasetName", 8 | "datasetRecords": { 9 | "SampleKey1": { 10 | "oldValue": "oldValue1", 11 | "newValue": "newValue1", 12 | "op": "replace" 13 | }, 14 | "SampleKey2": { 15 | "oldValue": "oldValue2", 16 | "newValue": "newValue2", 17 | "op": "replace" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /docs/events/cognito-user-pool/create-auth-challenge.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1", 3 | "triggerSource": "CreateAuthChallenge_Authentication", 4 | "region": "us-east-1", 5 | "userPoolId": "us-east-1_example", 6 | "userName": "UserName", 7 | "callerContext": { 8 | "awsSdkVersion": "awsSdkVersion", 9 | "clientId": "clientId" 10 | }, 11 | "request": { 12 | "userAttributes": { 13 | "sub": "4A709A36-7D63-4785-829D-4198EF10EBDA", 14 | "email_verified": "true", 15 | "name": "First Last", 16 | "email": "create-auth@mail.com" 17 | }, 18 | "challengeName": "PASSWORD_VERIFIER", 19 | "session": [ 20 | { 21 | "challengeName": "CUSTOM_CHALLENGE", 22 | "challengeResult": true, 23 | "challengeMetadata": "CAPTCHA_CHALLENGE" 24 | } 25 | ], 26 | "userNotFound": false 27 | }, 28 | "response": {} 29 | } 30 | -------------------------------------------------------------------------------- /docs/events/cognito-user-pool/custom-email-sender.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1", 3 | "triggerSource": "CustomEmailSender_ForgotPassword", 4 | "region": "us-east-1", 5 | "userPoolId": "us-east-1_LnS...", 6 | "userName": "54cf7eb7-0b96-4304-...", 7 | "callerContext": { 8 | "awsSdkVersion": "aws-sdk-nodejs-2.856.0", 9 | "clientId": "6u7c9vr3pkstoog..." 10 | }, 11 | "request": { 12 | "type": "customEmailSenderRequestV1", 13 | "code": "AYADeILxywKhhaq8Ys4mh0aHutYAgQACABVhd3MtY3J5c...", 14 | "clientMetadata": null, 15 | "userAttributes": { 16 | "sub": "54cf7eb7-0b96-4304-8d6b-...", 17 | "email_verified": "true", 18 | "cognito:user_status": "CONFIRMED", 19 | "cognito:email_alias": "hello@maxivanov.io", 20 | "phone_number_verified": "false", 21 | "phone_number": "...", 22 | "given_name": "Max", 23 | "family_name": "Ivanov", 24 | "email": "hello@maxivanov.io" 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /docs/events/cognito-user-pool/custom-message.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1", 3 | "triggerSource": "CustomMessage_AdminCreateUser", 4 | "region": "region", 5 | "userPoolId": "userPoolId", 6 | "userName": "userName", 7 | "callerContext": { 8 | "awsSdk": "awsSdkVersion", 9 | "clientId": "clientId" 10 | }, 11 | "request": { 12 | "userAttributes": { 13 | "phone_number_verified": false, 14 | "email_verified": true 15 | }, 16 | "codeParameter": "####", 17 | "usernameParameter": "username" 18 | }, 19 | "response": {} 20 | } 21 | -------------------------------------------------------------------------------- /docs/events/cognito-user-pool/define-auth-challenge.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1", 3 | "region": "us-east-1", 4 | "userPoolId": "us-east-1_example", 5 | "userName": "UserName", 6 | "callerContext": { 7 | "awsSdkVersion": "awsSdkVersion", 8 | "clientId": "clientId" 9 | }, 10 | "triggerSource": "DefineAuthChallenge_Authentication", 11 | "request": { 12 | "userAttributes": { 13 | "sub": "4A709A36-7D63-4785-829D-4198EF10EBDA", 14 | "email_verified": "true", 15 | "name": "First Last", 16 | "email": "define-auth@mail.com" 17 | }, 18 | "session": [ 19 | { 20 | "challengeName": "PASSWORD_VERIFIER", 21 | "challengeResult": true 22 | }, 23 | { 24 | "challengeName": "CUSTOM_CHALLENGE", 25 | "challengeResult": true, 26 | "challengeMetadata": "CAPTCHA_CHALLENGE" 27 | } 28 | ], 29 | "userNotFound": true 30 | }, 31 | "response": {} 32 | } 33 | -------------------------------------------------------------------------------- /docs/events/cognito-user-pool/post-authentication.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1", 3 | "triggerSource": "PostAuthentication_Authentication", 4 | "region": "us-east-1", 5 | "userPoolId": "us-east-1_example", 6 | "userName": "UserName", 7 | "callerContext": { 8 | "awsSdkVersion": "awsSdkVersion", 9 | "clientId": "clientId" 10 | }, 11 | "request": { 12 | "newDeviceUsed": true, 13 | "userAttributes": { 14 | "email": "post-auth@mail.com" 15 | } 16 | }, 17 | "response": {} 18 | } 19 | -------------------------------------------------------------------------------- /docs/events/cognito-user-pool/post-confirmation.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "string", 3 | "triggerSource": "PostConfirmation_ConfirmSignUp", 4 | "region": "us-east-1", 5 | "userPoolId": "string", 6 | "userName": "userName", 7 | "callerContext": { 8 | "awsSdkVersion": "awsSdkVersion", 9 | "clientId": "clientId" 10 | }, 11 | "request": { 12 | "userAttributes": { 13 | "email": "user@example.com", 14 | "email_verified": true 15 | } 16 | }, 17 | "response": {} 18 | } 19 | -------------------------------------------------------------------------------- /docs/events/cognito-user-pool/pre-authentication.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1", 3 | "triggerSource": "PreAuthentication_Authentication", 4 | "region": "us-east-1", 5 | "userPoolId": "us-east-1_example", 6 | "userName": "UserName", 7 | "callerContext": { 8 | "awsSdkVersion": "awsSdkVersion", 9 | "clientId": "clientId" 10 | }, 11 | "request": { 12 | "userAttributes": { 13 | "sub": "4A709A36-7D63-4785-829D-4198EF10EBDA", 14 | "email_verified": "true", 15 | "name": "First Last", 16 | "email": "pre-auth@mail.com" 17 | } 18 | }, 19 | "response": {} 20 | } 21 | -------------------------------------------------------------------------------- /docs/events/cognito-user-pool/pre-signup.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "string", 3 | "triggerSource": "PreSignUp_SignUp", 4 | "region": "us-east-1", 5 | "userPoolId": "string", 6 | "userName": "userName", 7 | "callerContext": { 8 | "awsSdkVersion": "awsSdkVersion", 9 | "clientId": "clientId" 10 | }, 11 | "request": { 12 | "userAttributes": { 13 | "email": "user@example.com", 14 | "phone_number": "+12065550100" 15 | } 16 | }, 17 | "response": {} 18 | } -------------------------------------------------------------------------------- /docs/events/cognito-user-pool/pre-token-generation.json: -------------------------------------------------------------------------------- 1 | { 2 | "triggerSource": "TokenGeneration_Authentication", 3 | "version": "1", 4 | "region": "us-west-2", 5 | "userPoolId": "us-west-2_example", 6 | "userName": "testqq", 7 | "callerContext": { 8 | "awsSdkVersion": "aws-sdk-unknown-unknown", 9 | "clientId": "71ghuul37mresr7h373b704tua" 10 | }, 11 | "request": { 12 | "userAttributes": { 13 | "sub": "0b0a57c5-f013-426a-81a1-f8ffbfba21f0", 14 | "email_verified": "true", 15 | "cognito:user_status": "CONFIRMED", 16 | "email": "test@mail.com" 17 | }, 18 | "groupConfiguration": { 19 | "groupsToOverride": [], 20 | "iamRolesToOverride": [], 21 | "preferredRole": null 22 | } 23 | }, 24 | "response": {} 25 | } 26 | -------------------------------------------------------------------------------- /docs/events/cognito-user-pool/user-migration.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "string", 3 | "triggerSource": "UserMigration_Authentication", 4 | "region": "us-east-1", 5 | "userPoolId": "string", 6 | "userName": "userName", 7 | "callerContext": { 8 | "awsSdkVersion": "awsSdkVersion", 9 | "clientId": "clientId" 10 | }, 11 | "request": { 12 | "password": "password" 13 | }, 14 | "response": {} 15 | } 16 | -------------------------------------------------------------------------------- /docs/events/cognito-user-pool/verify-auth-challenge-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1", 3 | "region": "us-east-1", 4 | "userPoolId": "us-east-1_example", 5 | "userName": "UserName", 6 | "callerContext": { 7 | "awsSdkVersion": "awsSdkVersion", 8 | "clientId": "clientId" 9 | }, 10 | "triggerSource": "VerifyAuthChallengeResponse_Authentication", 11 | "request": { 12 | "userAttributes": { 13 | "sub": "4A709A36-7D63-4785-829D-4198EF10EBDA", 14 | "email_verified": "true", 15 | "name": "First Last", 16 | "email": "verify-auth@mail.com" 17 | }, 18 | "privateChallengeParameters": { 19 | "answer": "challengeAnswer" 20 | }, 21 | "clientMetadata": { 22 | "foo": "value" 23 | }, 24 | "challengeAnswer": "challengeAnswer", 25 | "userNotFound": true 26 | }, 27 | "response": {} 28 | } 29 | -------------------------------------------------------------------------------- /docs/events/dynamodb/dynamodb.json: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "eventID": "c4ca4238a0b923820dcc509a6f75849b", 5 | "eventName": "INSERT", 6 | "eventVersion": "1.1", 7 | "eventSource": "aws:dynamodb", 8 | "awsRegion": "eu-central-1", 9 | "dynamodb": { 10 | "Keys": { 11 | "Id": { 12 | "N": "101" 13 | } 14 | }, 15 | "NewImage": { 16 | "Message": { 17 | "S": "New item!" 18 | }, 19 | "Id": { 20 | "N": "101" 21 | } 22 | }, 23 | "ApproximateCreationDateTime": 1428537600, 24 | "SequenceNumber": "4421584500000000017450439091", 25 | "SizeBytes": 26, 26 | "StreamViewType": "NEW_AND_OLD_IMAGES" 27 | }, 28 | "eventSourceARN": "arn:aws:dynamodb:eu-central-1:123456789012:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899", 29 | "userIdentity": { 30 | "principalId": "dynamodb.amazonaws.com", 31 | "type": "Service" 32 | } 33 | }, 34 | { 35 | "eventID": "c81e728d9d4c2f636f067f89cc14862c", 36 | "eventName": "MODIFY", 37 | "eventVersion": "1.1", 38 | "eventSource": "aws:dynamodb", 39 | "awsRegion": "eu-central-1", 40 | "dynamodb": { 41 | "Keys": { 42 | "Id": { 43 | "N": "101" 44 | } 45 | }, 46 | "NewImage": { 47 | "Message": { 48 | "S": "This item has changed" 49 | }, 50 | "Id": { 51 | "N": "101" 52 | } 53 | }, 54 | "OldImage": { 55 | "Message": { 56 | "S": "New item!" 57 | }, 58 | "Id": { 59 | "N": "101" 60 | } 61 | }, 62 | "ApproximateCreationDateTime": 1428537600, 63 | "SequenceNumber": "4421584500000000017450439092", 64 | "SizeBytes": 59, 65 | "StreamViewType": "NEW_AND_OLD_IMAGES" 66 | }, 67 | "eventSourceARN": "arn:aws:dynamodb:eu-central-1:123456789012:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899" 68 | }, 69 | { 70 | "eventID": "eccbc87e4b5ce2fe28308fd9f2a7baf3", 71 | "eventName": "REMOVE", 72 | "eventVersion": "1.1", 73 | "eventSource": "aws:dynamodb", 74 | "awsRegion": "eu-central-1", 75 | "dynamodb": { 76 | "Keys": { 77 | "Id": { 78 | "N": "101" 79 | } 80 | }, 81 | "OldImage": { 82 | "Message": { 83 | "S": "This item has changed" 84 | }, 85 | "Id": { 86 | "N": "101" 87 | } 88 | }, 89 | "ApproximateCreationDateTime": 1428537600, 90 | "SequenceNumber": "4421584500000000017450439093", 91 | "SizeBytes": 38, 92 | "StreamViewType": "NEW_AND_OLD_IMAGES" 93 | }, 94 | "eventSourceARN": "arn:aws:dynamodb:eu-central-1:123456789012:table/ExampleTableWithStream/stream/2015-06-27T00:48:05.899" 95 | } 96 | ] 97 | } -------------------------------------------------------------------------------- /docs/events/kinesis-firehose/kinesis-firehose-cloudwatch-logs-processor.json: -------------------------------------------------------------------------------- 1 | { 2 | "records": [ 3 | { 4 | "recordId": "49578734086442259037497492980620233840400173390482112514000000", 5 | "data": "H4sIAAAAAAAAADWO0QqCMBiFX2XsWiJFi7wLUW8sIYUuQmLpnxvpJttMQnz3Ztrlxzmc8424BaVIDfmnA+zjID3nlzS5n8IsO8YhtrAYOMg5aURfDUSXNBG1MkEj6liKvjPZQpmWQNoFVf9QpWSdZoJHrNEgFfZvxa8XvoHrGUfMqqWumdHQpDVjtmdvHc91dwdn71p/vVngmqBVD616PgoolC/Ga0SBNJoi8USVWWKczM8oYhKoULDBUzF9Aeua5yHsAAAA", 6 | "approximateArrivalTimestamp": 1510254469499 7 | }, 8 | { 9 | "recordId": "49578734086442259037497492980621442766219788363254202370000000", 10 | "data": "H4sIAAAAAAAAAJWRTWsbMRCG/8ueLZjRjL5yc9NNLnZDapemlFAkrTYstb3Lep0Qgv97x00KgTSHnAQzmkeP3nmqtmW/j3dl/TiU6qz6PF/Pfy3r1Wp+WVezqn/YlVHK2pK3Hr0Jxkt5099djv1hkE7uh0eVHzZqE7epiarb3fe/ixzDYVJoELRhssYQqsXLlEJ3jd8//biy4QYWz7jVNJa4/TDveQwV+qsada0v/HnthLg/pH0eu2Hq+t1Ft5nKuK/Ofn4EvnpDUAu7Xi6/LL9en3/z1e1f7fq+7KYT+qnqGrEnsi54AGS2wbHWxjCjoWAYGawmzawByIG3Dp0JzjOxsaI8dbKJKW4l1BcTdgg+zP5tSPCeQ/Bso/I+o+I2kUptjgrRlQyasslUHWdvZRwGJ4+HYJGCtiKgQTYKSJ4gODLgAkpFk3f0rkyA1zLGSsvoVsVCRTFakUkNqKxt1IyFc8T/y0gEmoHZo5a/W9HhU0TeWHMyIJaoQC6zDvC+DL6WSW3MqZSkiolJcWoalWybJSNIJTXcRgjV8fb4BwwLrNzwAgAA", 11 | "approximateArrivalTimestamp": 1510254473773 12 | }, 13 | { 14 | "recordId": "49578734086442259037497492980622651692039402992428908546000000", 15 | "data": "H4sIAAAAAAAAAJWRbWsbMQyA/8t9jkGSJdnut2zLCiXZyJKyZaMM352vHEty4e7SUkr++9yXwUbXD8Vgg2w9eizdF7s0DPE6re8OqTgrPkzX05+L2Wo1PZ8Vk6K73ac+h0mtV49egvgc3nbX5313POSbqjvcmep2a7ZxV9bRtPub7lfKx+E4GhQEErYqYtHMn7MMuiV+fbf5rOEbzJ9wq7FPcfdm3lOaNReXyws/3cw2fvk9A4djOVR9exjbbv+x3Y6pH4qzH29hr14QzFzXi8WnxZfl+0tfXD1az27SfnxA3xdtneWtVRc8ADJrcEwkwoxigzAyiBNxzkJuIxGrei+g3gbgrDy2eRBj3OWePpuwQ/Bh8mdAGR+J69pJMFXKihwTGJ+aYJArpkjYQB2K0+SljMPgyFIIijaQgs2BAMEyexbns1NeoqpsCV+VCfCPTOVLLgUMU4h5S5UpE4BRm6ROqCEF/r8MExBDro3ED0XBMigFVM0iQlkRvZLml9a/LoN/yzSYKoIKTOmVTf6VNTHZxkjTIElkqlCL09XpN5PgkxrvAgAA", 16 | "approximateArrivalTimestamp": 1510254474027 17 | }, 18 | { 19 | "recordId": "49578734086442259037497492980623860617859017621603614722000000", 20 | "data": "H4sIAAAAAAAAAJWRW28aQQyF/8s+M9J47LHHeaMtzUOhEQXSVlVUDctstCqwCJZEUcR/r3OpFCnNQ17mcjw+8+n4vtqUwyFfl/ndrlRn1afhfPh7MprNhuejalB1t9uyNzkwJk6QosZk8rq7Pt93x51V6m535+rbtVvnzXKVXbu96f4U23bH3kEEHyIhx4jgxs9dDmQK3z/8vGD94cdPdrN+X/Lm3X5PbcHp5QLkYrqYLC6/mOHhuDzU+3bXt932c7vuy/5Qnf16j/fslYMb83wy+Tr5Nv24SNXVI/Xopmz7B+v7ql0ZPCKLJu+BiFUohBiJIKJGAvIkSTgpsU8aVBNangymsCH3rQ2izxvL9JmEBOzh4N+AzL6gX3JD7CLn4kg8OiVduahNkIa0BtbqNHgNI6AS0P5kQA3sUcA4IDCElCBKwgdgiCoI+CaM+pcwbAVfN8F5r2owGV0OdpWkS8kp52a1/D8MBR8sDUoQKDIbDnqlhAgQLTMWz8YbRQT92zDwEkbIQ10YHUZbKGfvUmrAIWodih2btKpOV6e/zXGIX+8CAAA=", 21 | "approximateArrivalTimestamp": 1510254474388 22 | } 23 | ], 24 | "region": "us-east-1", 25 | "deliveryStreamArn": "arn:aws:firehose:us-east-1:123456789012:deliverystream/copy-cwl-lambda-invoke-input-151025436553-Firehose-8KILJ01Q5OBN", 26 | "invocationId": "a7234216-12b6-4bc0-96d7-82606c0e80cf" 27 | } -------------------------------------------------------------------------------- /docs/events/kinesis-firehose/kinesis-firehose-message.json: -------------------------------------------------------------------------------- 1 | { 2 | "invocationId": "invoked123", 3 | "deliveryStreamArn": "aws:lambda:events", 4 | "region": "us-west-2", 5 | "records": [ 6 | { 7 | "data": "SGVsbG8gV29ybGQ=", 8 | "recordId": "record1", 9 | "approximateArrivalTimestamp": 1510772160000, 10 | "kinesisRecordMetadata": { 11 | "shardId": "shardId-000000000000", 12 | "partitionKey": "4d1ad2b9-24f8-4b9d-a088-76e9947c317a", 13 | "approximateArrivalTimestamp": "2012-04-23T18:25:43.511Z", 14 | "sequenceNumber": "49546986683135544286507457936321625675700192471156785154", 15 | "subsequenceNumber": "" 16 | } 17 | }, 18 | { 19 | "data": "SGVsbG8gV29ybGQ=", 20 | "recordId": "record2", 21 | "approximateArrivalTimestamp": 151077216000, 22 | "kinesisRecordMetadata": { 23 | "shardId": "shardId-000000000001", 24 | "partitionKey": "4d1ad2b9-24f8-4b9d-a088-76e9947c318a", 25 | "approximateArrivalTimestamp": "2012-04-23T19:25:43.511Z", 26 | "sequenceNumber": "49546986683135544286507457936321625675700192471156785155", 27 | "subsequenceNumber": "" 28 | } 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /docs/events/kinesis-streams/kinesis-streams.json: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "kinesis": { 5 | "kinesisSchemaVersion": "1.0", 6 | "partitionKey": "1", 7 | "sequenceNumber": "49590338271490256608559692538361571095921575989136588898", 8 | "data": "SGVsbG8sIHRoaXMgaXMgYSB0ZXN0Lg==", 9 | "approximateArrivalTimestamp": 1545084650.987 10 | }, 11 | "eventSource": "aws:kinesis", 12 | "eventVersion": "1.0", 13 | "eventID": "shardId-000000000006:49590338271490256608559692538361571095921575989136588898", 14 | "eventName": "aws:kinesis:record", 15 | "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", 16 | "awsRegion": "us-east-2", 17 | "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" 18 | }, 19 | { 20 | "kinesis": { 21 | "kinesisSchemaVersion": "1.0", 22 | "partitionKey": "1", 23 | "sequenceNumber": "49590338271490256608559692540925702759324208523137515618", 24 | "data": "VGhpcyBpcyBvbmx5IGEgdGVzdC4=", 25 | "approximateArrivalTimestamp": 1545084711.166 26 | }, 27 | "eventSource": "aws:kinesis", 28 | "eventVersion": "1.0", 29 | "eventID": "shardId-000000000006:49590338271490256608559692540925702759324208523137515618", 30 | "eventName": "aws:kinesis:record", 31 | "invokeIdentityArn": "arn:aws:iam::123456789012:role/lambda-role", 32 | "awsRegion": "us-east-2", 33 | "eventSourceARN": "arn:aws:kinesis:us-east-2:123456789012:stream/lambda-stream" 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /docs/events/lex-v2/book-car.json: -------------------------------------------------------------------------------- 1 | { 2 | "sessionId": "254688924456220", 3 | "inputTranscript": "Book a car", 4 | "interpretations": [ 5 | { 6 | "intent": { 7 | "slots": { 8 | "ReturnDate": null, 9 | "PickUpDate": null, 10 | "DriverAge": null, 11 | "CarType": null, 12 | "PickUpCity": null 13 | }, 14 | "confirmationState": "None", 15 | "name": "BookCar", 16 | "state": "InProgress" 17 | }, 18 | "nluConfidence": 1 19 | }, 20 | { 21 | "intent": { 22 | "slots": { 23 | "RoomType": null, 24 | "CheckInDate": null, 25 | "Nights": null, 26 | "Location": null 27 | }, 28 | "confirmationState": "None", 29 | "name": "BookHotel", 30 | "state": "InProgress" 31 | }, 32 | "nluConfidence": 0.51 33 | }, 34 | { 35 | "intent": { 36 | "slots": {}, 37 | "confirmationState": "None", 38 | "name": "FallbackIntent", 39 | "state": "InProgress" 40 | } 41 | } 42 | ], 43 | "proposedNextState": { 44 | "intent": { 45 | "slots": { 46 | "ReturnDate": null, 47 | "PickUpDate": null, 48 | "DriverAge": null, 49 | "CarType": null, 50 | "PickUpCity": null 51 | }, 52 | "confirmationState": "None", 53 | "name": "BookCar", 54 | "state": "InProgress" 55 | }, 56 | "dialogAction": { 57 | "slotToElicit": "PickUpCity", 58 | "type": "ElicitSlot" 59 | } 60 | }, 61 | "responseContentType": "text/plain; charset=utf-8", 62 | "sessionState": { 63 | "intent": { 64 | "slots": { 65 | "ReturnDate": null, 66 | "PickUpDate": null, 67 | "DriverAge": null, 68 | "CarType": null, 69 | "PickUpCity": null 70 | }, 71 | "confirmationState": "None", 72 | "name": "BookCar", 73 | "state": "InProgress" 74 | }, 75 | "originatingRequestId": "d32005f8-c142-48b5-bf88-c2dd4c05a25e" 76 | }, 77 | "messageVersion": "1.0", 78 | "invocationSource": "DialogCodeHook", 79 | "transcriptions": [ 80 | { 81 | "resolvedSlots": {}, 82 | "resolvedContext": { 83 | "intent": "BookCar" 84 | }, 85 | "transcription": "Book a car", 86 | "transcriptionConfidence": 1 87 | } 88 | ], 89 | "inputMode": "Text", 90 | "bot": { 91 | "aliasName": "TestBotAlias", 92 | "aliasId": "TSTALIASID", 93 | "name": "BookTrip", 94 | "version": "DRAFT", 95 | "localeId": "en_US", 96 | "id": "CCGFLGVZMD" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /docs/events/lex-v2/book-hotel.json: -------------------------------------------------------------------------------- 1 | { 2 | "sessionId": "254688924456104", 3 | "inputTranscript": "Book a hotel", 4 | "interpretations": [ 5 | { 6 | "intent": { 7 | "slots": { 8 | "RoomType": null, 9 | "CheckInDate": null, 10 | "Nights": null, 11 | "Location": null 12 | }, 13 | "confirmationState": "None", 14 | "name": "BookHotel", 15 | "state": "InProgress" 16 | }, 17 | "nluConfidence": 1 18 | }, 19 | { 20 | "intent": { 21 | "slots": {}, 22 | "confirmationState": "None", 23 | "name": "FallbackIntent", 24 | "state": "InProgress" 25 | } 26 | }, 27 | { 28 | "intent": { 29 | "slots": { 30 | "ReturnDate": null, 31 | "PickUpDate": null, 32 | "DriverAge": null, 33 | "CarType": null, 34 | "PickUpCity": null 35 | }, 36 | "confirmationState": "None", 37 | "name": "BookCar", 38 | "state": "InProgress" 39 | }, 40 | "nluConfidence": 0.42 41 | } 42 | ], 43 | "proposedNextState": { 44 | "intent": { 45 | "slots": { 46 | "RoomType": null, 47 | "CheckInDate": null, 48 | "Nights": null, 49 | "Location": null 50 | }, 51 | "confirmationState": "None", 52 | "name": "BookHotel", 53 | "state": "InProgress" 54 | }, 55 | "dialogAction": { 56 | "slotToElicit": "Location", 57 | "type": "ElicitSlot" 58 | } 59 | }, 60 | "responseContentType": "text/plain; charset=utf-8", 61 | "sessionState": { 62 | "intent": { 63 | "slots": { 64 | "RoomType": null, 65 | "CheckInDate": null, 66 | "Nights": null, 67 | "Location": null 68 | }, 69 | "confirmationState": "None", 70 | "name": "BookHotel", 71 | "state": "InProgress" 72 | }, 73 | "originatingRequestId": "4686558a-ebce-49a8-9df9-f513590c0a95" 74 | }, 75 | "messageVersion": "1.0", 76 | "invocationSource": "DialogCodeHook", 77 | "transcriptions": [ 78 | { 79 | "resolvedSlots": {}, 80 | "resolvedContext": { 81 | "intent": "BookHotel" 82 | }, 83 | "transcription": "Book a hotel", 84 | "transcriptionConfidence": 1 85 | } 86 | ], 87 | "inputMode": "Text", 88 | "bot": { 89 | "aliasName": "TestBotAlias", 90 | "aliasId": "TSTALIASID", 91 | "name": "BookTrip", 92 | "version": "DRAFT", 93 | "localeId": "en_US", 94 | "id": "CCGFLGVZMD" 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /docs/events/lex/book-car.json: -------------------------------------------------------------------------------- 1 | { 2 | "messageVersion": "1.0", 3 | "invocationSource": "DialogCodeHook", 4 | "userId": "John", 5 | "sessionAttributes": {}, 6 | "bot": { 7 | "name": "BookTrip", 8 | "alias": "$LATEST", 9 | "version": "$LATEST" 10 | }, 11 | "outputDialogMode": "Text", 12 | "currentIntent": { 13 | "name": "BookCar", 14 | "slots": { 15 | "PickUpCity": "Chicago", 16 | "PickUpDate": "2030-11-08", 17 | "ReturnDate": "2030-11-08", 18 | "CarType": "economy", 19 | "DriverAge": 21 20 | }, 21 | "confirmationStatus": "None" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /docs/events/lex/book-hotel.json: -------------------------------------------------------------------------------- 1 | { 2 | "messageVersion": "1.0", 3 | "invocationSource": "DialogCodeHook", 4 | "userId": "John", 5 | "sessionAttributes": {}, 6 | "bot": { 7 | "name": "BookTrip", 8 | "alias": "$LATEST", 9 | "version": "$LATEST" 10 | }, 11 | "outputDialogMode": "Text", 12 | "currentIntent": { 13 | "name": "BookHotel", 14 | "slots": { 15 | "Location": "Chicago", 16 | "CheckInDate": "2030-11-08", 17 | "Nights": 4, 18 | "RoomType": "queen" 19 | }, 20 | "confirmationStatus": "None" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /docs/events/lex/make-appointment.json: -------------------------------------------------------------------------------- 1 | { 2 | "messageVersion": "1.0", 3 | "invocationSource": "DialogCodeHook", 4 | "userId": "John", 5 | "sessionAttributes": {}, 6 | "bot": { 7 | "name": "MakeAppointment", 8 | "alias": "$LATEST", 9 | "version": "$LATEST" 10 | }, 11 | "outputDialogMode": "Text", 12 | "currentIntent": { 13 | "name": "MakeAppointment", 14 | "slots": { 15 | "AppointmentType": "whitening", 16 | "Date": "2030-11-08", 17 | "Time": "10:00" 18 | }, 19 | "confirmationStatus": "None" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /docs/events/lex/order-flowers.json: -------------------------------------------------------------------------------- 1 | { 2 | "messageVersion": "1.0", 3 | "invocationSource": "DialogCodeHook", 4 | "userId": "John", 5 | "sessionAttributes": {}, 6 | "bot": { 7 | "name": "OrderFlowers", 8 | "alias": "$LATEST", 9 | "version": "$LATEST" 10 | }, 11 | "outputDialogMode": "Text", 12 | "currentIntent": { 13 | "name": "OrderFlowers", 14 | "slots": { 15 | "FlowerType": "lilies", 16 | "PickupDate": "2030-11-08", 17 | "PickupTime": "10:00" 18 | }, 19 | "confirmationStatus": "None" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /docs/events/s3-batch/s3-batch.json: -------------------------------------------------------------------------------- 1 | { 2 | "invocationSchemaVersion": "1.0", 3 | "invocationId": "YXNkbGZqYWRmaiBhc2RmdW9hZHNmZGpmaGFzbGtkaGZza2RmaAo", 4 | "job": { 5 | "id": "f3cc4f60-61f6-4a2b-8a21-d07600c373ce" 6 | }, 7 | "tasks": [ 8 | { 9 | "taskId": "dGFza2lkZ29lc2hlcmUK", 10 | "s3Key": "customerImage1.jpg", 11 | "s3VersionId": "1", 12 | "s3BucketArn": "arn:aws:s3:us-east-1:0123456788:examplebucket" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /docs/events/s3-object-lambda/s3-object-lambda-iam-user.json: -------------------------------------------------------------------------------- 1 | { 2 | "xAmzRequestId": "1a5ed718-5f53-471d-b6fe-5cf62d88d02a", 3 | "getObjectContext": { 4 | "inputS3Url": "https://myap-123412341234.s3-accesspoint.us-east-1.amazonaws.com/s3.txt?X-Amz-Security-Token=...", 5 | "outputRoute": "io-iad-cell001", 6 | "outputToken": "..." 7 | }, 8 | "configuration": { 9 | "accessPointArn": "arn:aws:s3-object-lambda:us-east-1:123412341234:accesspoint/myolap", 10 | "supportingAccessPointArn": "arn:aws:s3:us-east-1:123412341234:accesspoint/myap", 11 | "payload": "test" 12 | }, 13 | "userRequest": { 14 | "url": "/s3.txt", 15 | "headers": { 16 | "Host": "myolap-123412341234.s3-object-lambda.us-east-1.amazonaws.com", 17 | "Accept-Encoding": "identity", 18 | "X-Amz-Content-SHA256": "e3b0c44297fc1c149afbf4c8995fb92427ae41e4649b934ca495991b7852b855" 19 | } 20 | }, 21 | "userIdentity": { 22 | "type": "IAMUser", 23 | "principalId": "...", 24 | "arn": "arn:aws:iam::123412341234:user/myuser", 25 | "accountId": "123412341234", 26 | "accessKeyId": "...", 27 | "userName": "Alice" 28 | }, 29 | "protocolVersion": "1.00" 30 | } -------------------------------------------------------------------------------- /docs/events/s3-object-lambda/s3-object-lambda-temp-credentials.json: -------------------------------------------------------------------------------- 1 | { 2 | "xAmzRequestId": "requestId", 3 | "getObjectContext": { 4 | "inputS3Url": "https://my-s3-ap-111122223333.s3-accesspoint.us-east-1.amazonaws.com/example?X-Amz-Security-Token=", 5 | "outputRoute": "io-use1-001", 6 | "outputToken": "OutputToken" 7 | }, 8 | "configuration": { 9 | "accessPointArn": "arn:aws:s3-object-lambda:us-east-1:111122223333:accesspoint/example-object-lambda-ap", 10 | "supportingAccessPointArn": "arn:aws:s3:us-east-1:111122223333:accesspoint/example-ap", 11 | "payload": "{}" 12 | }, 13 | "userRequest": { 14 | "url": "https://object-lambda-111122223333.s3-object-lambda.us-east-1.amazonaws.com/example", 15 | "headers": { 16 | "Host": "object-lambda-111122223333.s3-object-lambda.us-east-1.amazonaws.com", 17 | "Accept-Encoding": "identity", 18 | "X-Amz-Content-SHA256": "e3b0c44298fc1example" 19 | } 20 | }, 21 | "userIdentity": { 22 | "type": "AssumedRole", 23 | "principalId": "principalId", 24 | "arn": "arn:aws:sts::111122223333:assumed-role/Admin/example", 25 | "accountId": "111122223333", 26 | "accessKeyId": "accessKeyId", 27 | "sessionContext": { 28 | "attributes": { 29 | "mfaAuthenticated": "false", 30 | "creationDate": "Wed Mar 10 23:41:52 UTC 2021" 31 | }, 32 | "sessionIssuer": { 33 | "type": "Role", 34 | "principalId": "principalId", 35 | "arn": "arn:aws:iam::111122223333:role/Admin", 36 | "accountId": "111122223333", 37 | "userName": "Admin" 38 | } 39 | } 40 | }, 41 | "protocolVersion": "1.00" 42 | } -------------------------------------------------------------------------------- /docs/events/s3/s3-delete.json: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "eventVersion": "2.0", 5 | "eventSource": "aws:s3", 6 | "awsRegion": "us-east-1", 7 | "eventTime": "1970-01-01T00:00:00.000Z", 8 | "eventName": "ObjectRemoved:Delete", 9 | "userIdentity": { 10 | "principalId": "EXAMPLE" 11 | }, 12 | "requestParameters": { 13 | "sourceIPAddress": "127.0.0.1" 14 | }, 15 | "responseElements": { 16 | "x-amz-request-id": "EXAMPLE123456789", 17 | "x-amz-id-2": "EXAMPLE123/5678abcdefghijklambdaisawesome/mnopqrstuvwxyzABCDEFGH" 18 | }, 19 | "s3": { 20 | "s3SchemaVersion": "1.0", 21 | "configurationId": "testConfigRule", 22 | "bucket": { 23 | "name": "example-bucket", 24 | "ownerIdentity": { 25 | "principalId": "EXAMPLE" 26 | }, 27 | "arn": "arn:aws:s3:::example-bucket" 28 | }, 29 | "object": { 30 | "key": "test/key", 31 | "sequencer": "0A1B2C3D4E5F678901" 32 | } 33 | } 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /docs/events/s3/s3-put.json: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "eventVersion": "2.0", 5 | "eventSource": "aws:s3", 6 | "awsRegion": "us-east-1", 7 | "eventTime": "1970-01-01T00:00:00.000Z", 8 | "eventName": "ObjectCreated:Put", 9 | "userIdentity": { 10 | "principalId": "EXAMPLE" 11 | }, 12 | "requestParameters": { 13 | "sourceIPAddress": "127.0.0.1" 14 | }, 15 | "responseElements": { 16 | "x-amz-request-id": "EXAMPLE123456789", 17 | "x-amz-id-2": "EXAMPLE123/5678abcdefghijklambdaisawesome/mnopqrstuvwxyzABCDEFGH" 18 | }, 19 | "s3": { 20 | "s3SchemaVersion": "1.0", 21 | "configurationId": "testConfigRule", 22 | "bucket": { 23 | "name": "example-bucket", 24 | "ownerIdentity": { 25 | "principalId": "EXAMPLE" 26 | }, 27 | "arn": "arn:aws:s3:::example-bucket" 28 | }, 29 | "object": { 30 | "key": "test/key", 31 | "size": 1024, 32 | "eTag": "0123456789abcdef0123456789abcdef", 33 | "sequencer": "0A1B2C3D4E5F678901" 34 | } 35 | } 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /docs/events/secret-manager/secret-manager-create.json: -------------------------------------------------------------------------------- 1 | { 2 | "ClientRequestToken": "51f72378-6a5d-5dc7-8fd8-29e4319f482a", 3 | "SecretId": "arn:aws:secretsmanager:us-east-2:111122223333:secret:DatabaseSecret", 4 | "Step": "createSecret" 5 | } -------------------------------------------------------------------------------- /docs/events/sns/sns-message.json: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "EventVersion": "1.0", 5 | "EventSubscriptionArn": "arn:aws:sns:us-east-2:123456789012:sns-lambda:21be56ed-a058-49f5-8c98-aedd2564c486", 6 | "EventSource": "aws:sns", 7 | "Sns": { 8 | "SignatureVersion": "1", 9 | "Timestamp": "2019-01-02T12:45:07.000Z", 10 | "Signature": "tcc6faL2yUC6dgZdmrwh1Y4cGa/ebXEkAi6RibDsvpi+tE/1+82j...65r==", 11 | "SigningCertUrl": "https://sns.us-east-2.amazonaws.com/SimpleNotificationService-ac565b8b1a6c5d002d285f9598aa1d9b.pem", 12 | "MessageId": "95df01b4-ee98-5cb9-9903-4c221d41eb5e", 13 | "Message": "Hello from SNS!", 14 | "MessageAttributes": { 15 | "Test": { 16 | "Type": "String", 17 | "Value": "TestString" 18 | }, 19 | "TestBinary": { 20 | "Type": "Binary", 21 | "Value": "TestBinary" 22 | } 23 | }, 24 | "Type": "Notification", 25 | "UnsubscribeUrl": "https://sns.us-east-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-2:123456789012:test-lambda:21be56ed-a058-49f5-8c98-aedd2564c486", 26 | "TopicArn": "arn:aws:sns:us-east-2:123456789012:sns-lambda", 27 | "Subject": "TestInvoke" 28 | } 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /docs/events/sqs/sqs-fifo-queue.json: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "messageId": "11d6ee51-4cc7-4302-9e22-7cd8afdaadf5", 5 | "receiptHandle": "AQEBBX8nesZEXmkhsmZeyIE8iQAMig7qw...", 6 | "body": "Test message.", 7 | "attributes": { 8 | "ApproximateReceiveCount": "1", 9 | "SentTimestamp": "1573251510774", 10 | "SequenceNumber": "18849496460467696128", 11 | "MessageGroupId": "1", 12 | "SenderId": "AIDAIO23YVJENQZJOL4VO", 13 | "MessageDeduplicationId": "1", 14 | "ApproximateFirstReceiveTimestamp": "1573251510774" 15 | }, 16 | "messageAttributes": {}, 17 | "md5OfBody": "e4e68fb7bd0e697a0ae8f1bb342846b3", 18 | "eventSource": "aws:sqs", 19 | "eventSourceARN": "arn:aws:sqs:us-east-2:123456789012:fifo.fifo", 20 | "awsRegion": "us-east-2" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /docs/events/sqs/sqs-standard-queue.json: -------------------------------------------------------------------------------- 1 | { 2 | "Records": [ 3 | { 4 | "messageId": "059f36b4-87a3-44ab-83d2-661975830a7d", 5 | "receiptHandle": "AQEBwJnKyrHigUMZj6rYigCgxlaS3SLy0a...", 6 | "body": "Test message.", 7 | "attributes": { 8 | "ApproximateReceiveCount": "1", 9 | "SentTimestamp": "1545082649183", 10 | "SenderId": "AIDAIENQZJOLO23YVJ4VO", 11 | "ApproximateFirstReceiveTimestamp": "1545082649185" 12 | }, 13 | "messageAttributes": {}, 14 | "md5OfBody": "e4e68fb7bd0e697a0ae8f1bb342846b3", 15 | "eventSource": "aws:sqs", 16 | "eventSourceARN": "arn:aws:sqs:us-east-2:123456789012:my-queue", 17 | "awsRegion": "us-east-2" 18 | }, 19 | { 20 | "messageId": "2e1424d4-f796-459a-8184-9c92662be6da", 21 | "receiptHandle": "AQEBzWwaftRI0KuVm4tP+/7q1rGgNqicHq...", 22 | "body": "Test message.", 23 | "attributes": { 24 | "ApproximateReceiveCount": "1", 25 | "SentTimestamp": "1545082650636", 26 | "SenderId": "AIDAIENQZJOLO23YVJ4VO", 27 | "ApproximateFirstReceiveTimestamp": "1545082650649" 28 | }, 29 | "messageAttributes": {}, 30 | "md5OfBody": "e4e68fb7bd0e697a0ae8f1bb342846b3", 31 | "eventSource": "aws:sqs", 32 | "eventSourceARN": "arn:aws:sqs:us-east-2:123456789012:my-queue", 33 | "awsRegion": "us-east-2" 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /docs/events/work-mail/work-mail.json: -------------------------------------------------------------------------------- 1 | { 2 | "summaryVersion":"2018-10-10", 3 | "envelope":{ 4 | "mailFrom":{ 5 | "address":"from@example.com" 6 | }, 7 | "recipients":[ 8 | { 9 | "address":"recipient1@example.com" 10 | }, 11 | { 12 | "address":"recipient2@example.com" 13 | } 14 | ] 15 | }, 16 | "sender":{ 17 | "address":"sender@example.com" 18 | }, 19 | "subject":"Hello From Amazon WorkMail!", 20 | "messageId":"00000000-0000-0000-0000-000000000000", 21 | "invocationId":"00000000000000000000000000000000", 22 | "flowDirection":"INBOUND", 23 | "truncated":false 24 | } -------------------------------------------------------------------------------- /docs/function-url.md: -------------------------------------------------------------------------------- 1 | # Function URL 2 | 3 | Uses the same Request and Response structures as the [API Gateway Http API](./http-api.md), but has some different limits. 4 | 5 | See [AWS Lambda Function URLs vs. Amazon API Gateway](https://www.serverlessguru.com/blog/aws-lambda-function-urls-vs-amazon-api-gateway) 6 | for a comparison to API Gateway. 7 | 8 | ## Limits 9 | 10 | Lambda specific hard limitations 11 | 12 | - Payload limit of 6mb for the Lambda 13 | - Maximum timeouts up to 900 seconds (15 minutes) 14 | 15 | 16 | ## Request 17 | 18 | ```json 19 | { 20 | "version": "2.0", 21 | "rawPath": "/my/path", 22 | "rawQueryString": "parameter1=value1¶meter1=value2¶meter2=value", 23 | "cookies": [ 24 | "cookie1", 25 | "cookie2" 26 | ], 27 | "headers": { 28 | "header1": "value1", 29 | "header2": "value1,value2" 30 | }, 31 | "queryStringParameters": { 32 | "parameter1": "value1,value2", 33 | "parameter2": "value" 34 | }, 35 | "requestContext": { 36 | "accountId": "123456789012", 37 | "apiId": "", 38 | "authorizer": { 39 | "iam": { 40 | "accessKey": "AKIA...", 41 | "accountId": "111122223333", 42 | "callerId": "AIDA...", 43 | "userArn": "arn:aws:iam::111122223333:user/example-user", 44 | "userId": "AIDA..." 45 | } 46 | }, 47 | "domainName": ".lambda-url.us-west-2.on.aws", 48 | "domainPrefix": "", 49 | "http": { 50 | "method": "POST", 51 | "path": "/my/path", 52 | "protocol": "HTTP/1.1", 53 | "sourceIp": "123.123.123.123", 54 | "userAgent": "agent" 55 | }, 56 | "requestId": "id", 57 | "time": "12/Mar/2020:19:03:58 +0000", 58 | "timeEpoch": 1583348638390 59 | }, 60 | "body": "Hello from client!", 61 | "isBase64Encoded": false 62 | } 63 | ``` 64 | 65 | ## Response 66 | 67 | ```json 68 | { 69 | "statusCode": 201, 70 | "headers": { 71 | "Content-Type": "application/json", 72 | "My-Custom-Header": "Custom Value" 73 | }, 74 | "body": "{ \"message\": \"Hello, world!\" }", 75 | "cookies": [ 76 | "Cookie_1=Value1; Expires=21 Oct 2021 07:48 GMT", 77 | "Cookie_2=Value2; Max-Age=78000" 78 | ], 79 | "isBase64Encoded": false 80 | } 81 | ``` 82 | 83 | ## Resources 84 | 85 | Typed Lambda handlers by Language 86 | 87 | - [Go - LambdaFunctionURLRequest typing](https://github.com/aws/aws-lambda-go/blob/main/events/lambda_function_urls.go) - Go `github.com/aws/aws-lambda-go/events` 88 | 89 | ## Documention 90 | 91 | - [Blog: AWS Lambda Function URLs: Built-in HTTPS Endpoints for Single-Function Microservices](https://aws.amazon.com/blogs/aws/announcing-aws-lambda-function-urls-built-in-https-endpoints-for-single-function-microservices/){target="_blank"} 92 | - [Blog: AWS Lambda: function URL is live! - By Yan Cui](https://lumigo.io/blog/aws-lambda-function-url-is-live/){target="_blank"} 93 | -------------------------------------------------------------------------------- /docs/iot-events.md: -------------------------------------------------------------------------------- 1 | # IOT Events 2 | 3 | ## Request 4 | 5 | ```json 6 | { 7 | "event: ":{ 8 | "eventName": "myChargedEvent", 9 | "eventTime": 1567797571647, 10 | "payload":{ 11 | "detector":{ 12 | "detectorModelName": "AWS_IoTEvents_Hello_World1567793458261", 13 | "detectorModelVersion": "4", 14 | "keyValue": "100009" 15 | }, 16 | "eventTriggerDetails":{ 17 | "triggerType": "Message", 18 | "inputName": "AWS_IoTEvents_HelloWorld_VoltageInput", 19 | "messageId": "64c75a34-068b-4a1d-ae58-c16215dc4efd" 20 | }, 21 | "actionExecutionId": "49f0f32f-1209-38a7-8a76-d6ca49dd0bc4", 22 | "state":{ 23 | "variables": {}, 24 | "stateName": "Charged", 25 | "timers": {} 26 | } 27 | } 28 | } 29 | } 30 | ``` 31 | 32 | ## Response 33 | 34 | ```json 35 | { 36 | "Statement": "{\"Sid\":\"iot-events\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"iotevents.amazonaws.com\"},\"Action\":\"lambda:InvokeFunction\",\"Resource\":\"arn:aws:lambda:us-west-2:123456789012:function:my-function\"}" 37 | } 38 | ``` 39 | 40 | ## Resources 41 | 42 | ## Documentation 43 | 44 | - [Using AWS Lambda with AWS IoT Events](https://docs.aws.amazon.com/lambda/latest/dg/services-iotevents.html) 45 | -------------------------------------------------------------------------------- /docs/iot.md: -------------------------------------------------------------------------------- 1 | # IOT 2 | 3 | ## Request 4 | 5 | ```json 6 | { 7 | "row" : "10", 8 | "pos" : "23", 9 | "moisture" : "75" 10 | } 11 | ``` 12 | 13 | ## Response 14 | 15 | ```json 16 | { 17 | "Statement": "{\"Sid\":\"iot-events\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"iot.amazonaws.com\"},\"Action\":\"lambda:InvokeFunction\",\"Resource\":\"arn:aws:lambda:us-west-2:123456789012:function:my-function\"}" 18 | } 19 | ``` 20 | 21 | ## Resources 22 | 23 | ## Documentation 24 | 25 | - [Using AWS Lambda with AWS IoT](https://docs.aws.amazon.com/lambda/latest/dg/services-iot.html) 26 | -------------------------------------------------------------------------------- /docs/lambda-context.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: When Lambda runs your function, it passes a context object to the handler. 3 | --- 4 | 5 | # Lambda Context 6 | 7 | When Lambda runs your function, it passes a context object to the handler. This object provides methods and properties that provide 8 | information about the invocation, function, and execution environment. 9 | 10 | ???+ NOTE 11 | During asynchronous invokes, the Lambda context field `clientContext` will not be populated. 12 | 13 | ## Docs 14 | 15 | - [DotNet - Lambda Context Docs](https://docs.aws.amazon.com/lambda/latest/dg/csharp-context.html) 16 | - [Python - Lambda Context Docs](https://docs.aws.amazon.com/lambda/latest/dg/python-context.html) 17 | - [Go - Lambda Context Docs](https://docs.aws.amazon.com/lambda/latest/dg/golang-context.html) 18 | - [Java - Lambda Context Docs](https://docs.aws.amazon.com/lambda/latest/dg/java-context.html) 19 | - [NodeJS - Lambda Context Docs](https://docs.aws.amazon.com/lambda/latest/dg/nodejs-context.html) 20 | 21 | ## Resources 22 | 23 | - [DotNet - ILambdaContext](https://github.com/aws/aws-lambda-dotnet/tree/master/Libraries/src/Amazon.Lambda.Core) - NuGet `Amazon.Lambda.Core` 24 | - [Java - Context](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-core/src/main/java/com/amazonaws/services/lambda/runtime/Context.java) - Maven `aws-lambda-java-core` 25 | - [Python - LambdaContext](https://awslabs.github.io/aws-lambda-powertools-python/latest/utilities/typing/) - Pip `aws-lambda-powertools` 26 | - [Typescript - Context](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/aws-lambda/handler.d.ts) - NPM `@types/aws-lambda` 27 | - [Go - LambdaContext](https://github.com/aws/aws-lambda-go/blob/main/lambdacontext/context.go) - Go `github.com/aws/aws-lambda-go/lambdacontext` 28 | - [Rust - Context](https://github.com/awslabs/aws-lambda-rust-runtime/blob/master/lambda-runtime/src/types.rs) - Cargo `aws-lambda-rust-runtime` 29 | - [Php - Bref\Context](https://github.com/brefphp/bref/blob/master/src/Context/Context.php) - Composer `bref/bref` 30 | -------------------------------------------------------------------------------- /docs/lambda-invoke-types.md: -------------------------------------------------------------------------------- 1 | # Lambda Invocation Types 2 | 3 | ![Lambda invokes types](./media/invoke-type-light.png#gh-light-mode-only) 4 | ![Lambda invokes types](./media/invoke-type-dark.png#gh-dark-mode-only) 5 | 6 | ## Synchronous Invokes 7 | 8 | Synchronous invocations are the most straight forward way to invoke your Lambda functions. In this model, your functions execute immediately when you perform the Lambda Invoke API call. For testing, when invoking directly use invoke type of `RequestResponse`. 9 | 10 | ## Asynchronous Invokes 11 | 12 | Asynchronous invokes place your invoke request in Lambda service queue and we process the requests as they arrive. For testing, when invoking directly use invoke type of `Event`. 13 | 14 | ???+ NOTE 15 | During asynchronous invokes, the Lambda context field `clientContext` will not be populated. 16 | 17 | ## Poll-Based Invokes 18 | 19 | AWS will manage the poller on your behalf and perform Synchronous invokes of your function with this type of integration. The retry behavior for this model is based on data expiration in the data source. 20 | 21 | - [Understanding the Different Ways to Invoke Lambda Functions](https://aws.amazon.com/blogs/architecture/understanding-the-different-ways-to-invoke-lambda-functions/){target="_blank"} 22 | -------------------------------------------------------------------------------- /docs/lambda-lifecycle.md: -------------------------------------------------------------------------------- 1 | # Lambda Lifecycle 2 | 3 | ![Invoke Lifecyle](./media/overview-lnvoke-light.png#gh-light-mode-only) 4 | ![Invoke Lifecyle](./media/overview-lnvoke-dark.png#gh-dark-mode-only) 5 | 6 | ## Init 7 | 8 | In the `Init` phase, Lambda performs three tasks: 9 | 10 | - Start all extensions (`Extension init`) 11 | - Bootstrap the runtime (`Runtime init`) 12 | - Run the function's static code (`Function init`) 13 | 14 | The `Init` phase ends when the runtime and all extensions signal that they are ready by sending a `Next` API request. The `Init` phase is limited to 10 seconds. If all three tasks do not complete within 10 seconds, Lambda retries the `Init` phase at the time of the first function invocation. 15 | 16 | ## Invoke 17 | 18 | When a Lambda function is invoked in response to a `Next` API request, Lambda sends an `Invoke` event to the runtime and to each extension. 19 | 20 | The function's timeout setting limits the duration of the entire `Invoke` phase. 21 | 22 | ## Shutdown 23 | 24 | When Lambda is about to shut down the runtime, it sends a `Shutdown` event to the runtime and to each external extension. Extensions can use this time for final cleanup tasks. The `Shutdown` event is a response to a `Next` API request. 25 | 26 | **Duration:** The entire Shutdown phase is capped at 2 seconds. If the runtime or any extension does not respond, Lambda terminates it via a signal (`SIGKILL`). 27 | 28 | ## Documentation 29 | 30 | - [AWS Lambda execution environment](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html){target="_blank"} 31 | - [Lambda Cold Starts and Bootstrap Code](https://bitesizedserverless.com/bite/lambda-cold-start-bootstrap/){target="_blank"} 32 | - [When is the Lambda Init Phase Free, and when is it Billed?](https://bitesizedserverless.com/bite/when-is-the-lambda-init-phase-free-and-when-is-it-billed/){target="_blank"} 33 | -------------------------------------------------------------------------------- /docs/media/aws-lambda-1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/media/aws-ses-example-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/docs/media/aws-ses-example-dark.png -------------------------------------------------------------------------------- /docs/media/aws-ses-example-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/docs/media/aws-ses-example-light.png -------------------------------------------------------------------------------- /docs/media/cloudfront-function-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/docs/media/cloudfront-function-dark.png -------------------------------------------------------------------------------- /docs/media/cloudfront-function-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/docs/media/cloudfront-function-light.png -------------------------------------------------------------------------------- /docs/media/cloudfront-lambda-edge-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/docs/media/cloudfront-lambda-edge-dark.png -------------------------------------------------------------------------------- /docs/media/cloudfront-lambda-edge-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/docs/media/cloudfront-lambda-edge-light.png -------------------------------------------------------------------------------- /docs/media/invoke-type-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/docs/media/invoke-type-dark.png -------------------------------------------------------------------------------- /docs/media/invoke-type-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/docs/media/invoke-type-light.png -------------------------------------------------------------------------------- /docs/media/overview-lnvoke-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/docs/media/overview-lnvoke-dark.png -------------------------------------------------------------------------------- /docs/media/overview-lnvoke-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/docs/media/overview-lnvoke-light.png -------------------------------------------------------------------------------- /docs/media/overview-lnvoke-with-error-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/docs/media/overview-lnvoke-with-error-light.png -------------------------------------------------------------------------------- /docs/mq.md: -------------------------------------------------------------------------------- 1 | # Amazon MQ 2 | 3 | Amazon MQ is a managed message broker service for Apache ActiveMQ and RabbitMQ, invokes the function synchronously 4 | 5 | ## Request 6 | 7 | ### ActiveMQ 8 | 9 | ```json title="AWS MQ message event example" 10 | --8<-- "docs/events/amazon-mq/active-mq.json" 11 | ``` 12 | 13 | ### RabbitMQ 14 | 15 | ```json 16 | --8<-- "docs/events/amazon-mq/rabbit-mq.json" 17 | ``` 18 | 19 | ## Response 20 | 21 | ## Resources 22 | 23 | - [Python - Active MQ](https://awslabs.github.io/aws-lambda-powertools-python/latest/utilities/data_classes/#active-mq) - PIP `aws-lambda-powertools` 24 | - [Python - Rabbit MQ](https://awslabs.github.io/aws-lambda-powertools-python/latest/utilities/data_classes/#rabbit-mq) - PIP `aws-lambda-powertools` 25 | 26 | ## Documentation 27 | 28 | - [Using Lambda with Amazon MQ](https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html) 29 | - [Using Amazon MQ as an event source for AWS Lambda](https://aws.amazon.com/blogs/compute/using-amazon-mq-as-an-event-source-for-aws-lambda/) 30 | -------------------------------------------------------------------------------- /docs/s3-batch.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: S3 Batch 3 | --- 4 | 5 | # S3 Batch Operations 6 | 7 | When the batch job starts, Amazon S3 invokes the Lambda function synchronously for each object in the manifest. The event parameter includes the names of the bucket and the object. 8 | 9 | ## Request 10 | 11 | ```json title="Example Amazon S3 batch request event" 12 | --8<-- "docs/events/s3-batch/s3-batch.json" 13 | ``` 14 | 15 | ## Response 16 | 17 | `resultCode` is the result of the Lambda function. 18 | : `Succeeded`, `TemporaryFailure` or `PermanentFailure` 19 | 20 | ```json title="Example Amazon S3 batch response" 21 | { 22 | "invocationSchemaVersion": "1.0", 23 | "treatMissingKeysAs" : "PermanentFailure", 24 | "invocationId" : "YXNkbGZqYWRmaiBhc2RmdW9hZHNmZGpmaGFzbGtkaGZza2RmaAo", 25 | "results": [ 26 | { 27 | "taskId": "dGFza2lkZ29lc2hlcmUK", 28 | "resultCode": "Succeeded", 29 | "resultString": "["Alice", "Bob"]" 30 | } 31 | ] 32 | } 33 | ``` 34 | 35 | ## Resources 36 | 37 | - [S3 Batch - Typescript](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/aws-lambda/trigger/s3-batch.d.ts) - NPM `@types/aws-lambda` 38 | - [S3 Batch - Go](https://github.com/aws/aws-lambda-go/blob/main/events/s3_batch_job.go) - `github.com/aws/aws-lambda-go/events` 39 | - [S3BatchEvent - Java](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/S3BatchEvent.java) - Maven `aws-lambda-java-events` 40 | - [S3BatchJobEvent](https://github.com/LegNeato/aws-lambda-events/blob/master/aws_lambda_events/src/generated/s3_batch_job.rs) - Crate `aws-lambda-events` 41 | - The `serverless-s3-batch` plugin is designed to make it easy to work with S3 Batch operations. NPM `serverless-s3-batch` 42 | 43 | ## Documentation 44 | 45 | - [Using AWS Lambda with Amazon S3 batch operations](https://docs.aws.amazon.com/lambda/latest/dg/services-s3-batch.html) 46 | - [S3 Batch - Invoke AWS Lambda function](https://docs.aws.amazon.com/AmazonS3/latest/userguide/batch-ops-invoke-lambda.html) 47 | - [A Guide to S3 Batch on AWS](https://www.alexdebrie.com/posts/s3-batch/) 48 | -------------------------------------------------------------------------------- /docs/secrets-manager.md: -------------------------------------------------------------------------------- 1 | # Secrets Manager 2 | 3 | Secrets Manager uses a Lambda function to rotate the secret for a secured service or database. Event-driven and synchronous invocation 4 | 5 | ## Request 6 | 7 | ### Request structure 8 | 9 | ```json 10 | { 11 | "Step" : "request.type", 12 | "SecretId" : "string", 13 | "ClientRequestToken" : "string" 14 | } 15 | ``` 16 | 17 | ### Request fields 18 | 19 | `Step` (String) 20 | : One of `createSecret`, `setSecret`, `testSecret` or `finishSecret` 21 | 22 | - `createSecret` - The first step of rotation is to create a new version of the secret. Depending on your rotation strategy, 23 | the new version can contain a new password, a new username and password, or more secret information. Secrets 24 | Manager labels the new version with the staging label `AWSPENDING`. 25 | - `setSecret` - Second step, rotation changes the credentials in the database or service to match the new credentials in the 26 | `AWSPENDING` version of the secret. 27 | - `testSecret` - Third step, rotation tests the `AWSPENDING` version of the secret by using it to access the database or service. 28 | - `finishSecret` - Final step, rotation moves the label `AWSCURRENT` from the previous secret version to this version. 29 | Secrets Manager adds the `AWSPREVIOUS` staging label to the previous version, so that you retain the last known 30 | good version of the secret. 31 | 32 | `SecretId` (String) 33 | : The secret ARN or other identifier 34 | 35 | `ClientRequestToken` (String) 36 | : The ClientRequestToken of the secret version 37 | 38 | ```json title="Example createSecret event" 39 | --8<-- "docs/events/secret-manager/secret-manager-create.json" 40 | ``` 41 | 42 | ## Response 43 | 44 | N/A 45 | 46 | ## Resources 47 | 48 | - [Typescript - SecretsManagerRotationEvent](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/aws-lambda/trigger/secretsmanager.d.ts) - NPM `@types/aws-lambda` 49 | - [Java - SecretsManagerRotationEvent](https://github.com/aws/aws-lambda-java-libs/blob/master/aws-lambda-java-events/src/main/java/com/amazonaws/services/lambda/runtime/events/SecretsManagerRotationEvent.java) 50 | - [Python - Secrets Manager rotation function templates](https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_available-rotation-templates.html) 51 | 52 | ## Documentation 53 | 54 | - [Using AWS Lambda with Secrets Manager](https://docs.aws.amazon.com/lambda/latest/dg/with-secrets-manager.html) 55 | - [How log rotation works](https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html) 56 | - [Customize a Lambda rotation function for Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_customize.html) 57 | -------------------------------------------------------------------------------- /event-schema/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | exclude = docs, .eggs, setup.py, .aws-sam, .git, dist, *.md, *.yaml, *.txt, *.ini, *.json 3 | ignore = E203, E266, W503, BLK100, W291, I004 4 | max-line-length = 120 5 | max-complexity = 15 6 | 7 | [isort] 8 | multi_line_output = 3 9 | include_trailing_comma = true 10 | force_grid_wrap = 0 11 | use_parentheses = true 12 | line_length = 120 13 | -------------------------------------------------------------------------------- /event-schema/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | build/ 3 | dist/ 4 | aws_lambda_publish_shared_event.egg-info/ 5 | aws_lambda_publish_shared_event/events/ 6 | __pycache__/ 7 | coverage.xml 8 | .coverage 9 | htmlcov/ 10 | .venv/ 11 | -------------------------------------------------------------------------------- /event-schema/MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include aws_lambda_publish_shared_event/events * -------------------------------------------------------------------------------- /event-schema/Makefile: -------------------------------------------------------------------------------- 1 | dev: 2 | pip3 install -U pip poetry 3 | poetry install 4 | 5 | format: 6 | poetry run isort aws_lambda_publish_shared_event tests 7 | poetry run black aws_lambda_publish_shared_event tests 8 | 9 | lint: format 10 | poetry run flake8 aws_lambda_publish_shared_event/* tests/* 11 | 12 | clean: 13 | rm -Rf build aws_lambda_publish_shared_event.egg-info/ dist/ aws_lambda_publish_shared_event/events/ .pytest_cache/ coverage.xml .coverage 14 | rm -Rf htmlcov/ 15 | 16 | clean-all: clean 17 | poetry env remove python3 18 | 19 | build: clean 20 | cp -Rf ../docs/events aws_lambda_publish_shared_event/ 21 | python3 setup.py build sdist bdist_wheel 22 | 23 | install: build 24 | python3 setup.py install 25 | 26 | publish: build 27 | poetry run twine upload --repository lambda-events dist/* 28 | 29 | test: build 30 | poetry run pytest --cov=aws_lambda_publish_shared_event --cov-report=xml 31 | 32 | coverage-html: 33 | poetry run pytest --cov=aws_lambda_publish_shared_event --cov-report=html 34 | 35 | security-baseline: 36 | poetry run bandit -r aws_lambda_publish_shared_event 37 | 38 | complexity-baseline: 39 | $(info Maintenability index) 40 | poetry run radon mi aws_lambda_publish_shared_event 41 | $(info Cyclomatic complexity index) 42 | poetry run xenon --max-absolute C --max-modules A --max-average A aws_lambda_publish_shared_event 43 | 44 | mypy: 45 | poetry run mypy --pretty aws_lambda_publish_shared_event 46 | 47 | pr: lint mypy test security-baseline complexity-baseline 48 | -------------------------------------------------------------------------------- /event-schema/aws_lambda_publish_shared_event/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/event-schema/aws_lambda_publish_shared_event/__init__.py -------------------------------------------------------------------------------- /event-schema/aws_lambda_publish_shared_event/generate_test_event/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/event-schema/aws_lambda_publish_shared_event/generate_test_event/__init__.py -------------------------------------------------------------------------------- /event-schema/aws_lambda_publish_shared_event/generate_test_event/__main__.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import json 3 | import sys 4 | from typing import List 5 | 6 | from aws_lambda_publish_shared_event.util import build_test_event, handle_list_arguments 7 | 8 | 9 | def parse_args(args: List[str]) -> argparse.Namespace: 10 | """Parse arguments from the cli""" 11 | parser = argparse.ArgumentParser(prog="generate-test-event", description="Generated a local test event") 12 | parser.add_argument("-l", "--list", dest="list", help="List of supported event sources", action="store_true") 13 | parser.add_argument("--filtered-list", dest="filtered_list", help="Filtered list") 14 | parser.add_argument("event", help="Event source", nargs="?", default=None) 15 | return parser.parse_args(args) 16 | 17 | 18 | def main(): 19 | args = parse_args(sys.argv[1:]) 20 | if handle_list_arguments(args): 21 | return True 22 | event = args.event 23 | if event is None: 24 | raise SystemExit("No event source specified") 25 | 26 | print(json.dumps(build_test_event(None, event)[1], indent=4)) 27 | 28 | 29 | if __name__ == "__main__": 30 | main() 31 | -------------------------------------------------------------------------------- /event-schema/aws_lambda_publish_shared_event/util.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import json 3 | import os 4 | from fnmatch import fnmatch 5 | from pathlib import Path 6 | from typing import Dict, List, Optional, Tuple 7 | 8 | template_root = f"{str(Path(__file__).parent)}/events/" 9 | 10 | 11 | def list_of_test_events() -> List[str]: 12 | """Get the list of supported test events""" 13 | templates: List[str] = [] 14 | for path, _, files in os.walk(template_root): 15 | templates.extend( 16 | removeprefix(template_root, os.path.join(path, name)) for name in files if fnmatch(name, "*.json") 17 | ) 18 | templates.sort() 19 | return templates 20 | 21 | 22 | def removeprefix(prefix: str, string: str) -> str: 23 | """Remove the prefix from the string""" 24 | return string[len(prefix) :] if string.startswith(prefix) else string 25 | 26 | 27 | def get_test_event_path(event_path: str) -> Path: 28 | """Get the Path for the relative path events and then fall back to one of the standard test events""" 29 | if os.path.exists(event_path): 30 | return Path(event_path) 31 | else: 32 | return Path(template_root + event_path) 33 | 34 | 35 | def build_test_event(event_name: Optional[str], event_path: str) -> Tuple[str, Dict]: 36 | """Load the event and return the event name and the parsed event""" 37 | path = get_test_event_path(event_path) 38 | event_name = event_name or path.name.replace(".json", "") 39 | event = json.loads(path.read_text()) 40 | return event_name, event 41 | 42 | 43 | def handle_list_arguments(args: argparse.Namespace) -> bool: 44 | """Handle any of the list arguments (-l, --filter-list) and return True if processed""" 45 | if args.list: 46 | print("List of supported event sources:") 47 | print(*list_of_test_events(), sep="\n") 48 | return True 49 | if args.filtered_list: 50 | filtered_list = list(filter(lambda x: x.startswith(args.filtered_list), list_of_test_events())) 51 | print("Filtered list of supported event sources:") 52 | print(*filtered_list, sep="\n") 53 | return True 54 | return False 55 | -------------------------------------------------------------------------------- /event-schema/generate-test-event: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | poetry run python3 -m aws_lambda_publish_shared_event.generate_test_event $@ 3 | -------------------------------------------------------------------------------- /event-schema/mypy.ini: -------------------------------------------------------------------------------- 1 | [mypy-boto3] 2 | ignore_missing_imports = True 3 | 4 | [mypy-pick] 5 | ignore_missing_imports = True 6 | -------------------------------------------------------------------------------- /event-schema/publish-shared-event: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | poetry run python3 -m aws_lambda_publish_shared_event $@ 3 | -------------------------------------------------------------------------------- /event-schema/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "aws-lambda-publish-shared-event" 3 | version = "0.15.0" 4 | description = "Creating Shareable Lambda Test Events" 5 | license = "MIT" 6 | authors = ["Michael Brewer"] 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.8" 10 | boto3 = "^1.28.69" 11 | pick = "^2.2.0" 12 | 13 | [tool.poetry.dev-dependencies] 14 | # Build and publish 15 | setuptools = "^67.8.0" 16 | wheel = "^0.38.4" 17 | twine = "^4.0.2" 18 | # Unit testing 19 | pytest = "^7.2.1" 20 | pytest-cov = "^4.0.0" 21 | # Autoformatting 22 | isort = "^5.12.0" 23 | black = "^23.10.1" 24 | # Linting 25 | flake8 = "^5.0.4" 26 | flake8-black = "^0.3.6" 27 | flake8-builtins = "^2.1.0" 28 | flake8-comprehensions = "^3.10.1" 29 | flake8-debugger = "^4.1.2" 30 | flake8-isort = "^6.0.0" 31 | flake8-variables-names = "^0.0.5" 32 | flake8-eradicate = "^1.4.0" 33 | flake8-bugbear = "^23.1.20" 34 | # Static analysis 35 | bandit = "^1.7.5" 36 | radon = "^5.1.0" 37 | xenon = "^0.9.1" 38 | # Typing 39 | mypy = "^1.6.1" 40 | 41 | [build-system] 42 | requires = ["setuptools", "wheel", "poetry-core>=1.0.0"] 43 | build-backend = "poetry.core.masonry.api" 44 | 45 | [tool.coverage.report] 46 | fail_under = 95 47 | exclude_lines = [ 48 | # Have to re-enable the standard pragma 49 | "pragma: no cover", 50 | 51 | # Don't complain about missing debug-only code: 52 | "def __repr__", 53 | "if self.debug", 54 | 55 | # Don't complain if tests don't hit defensive assertion code: 56 | "raise AssertionError", 57 | "raise NotImplementedError", 58 | 59 | # Don't complain if non-runnable code isn't run: 60 | "if 0:", 61 | "if __name__ == .__main__.:", 62 | 63 | # Ignore type function overload 64 | "@overload", 65 | ] 66 | 67 | [tool.isort] 68 | multi_line_output = 3 69 | include_trailing_comma = true 70 | force_grid_wrap = 0 71 | use_parentheses = true 72 | line_length = 120 73 | 74 | [tool.black] 75 | line-length = 120 76 | -------------------------------------------------------------------------------- /event-schema/setup.py: -------------------------------------------------------------------------------- 1 | import pathlib 2 | 3 | import setuptools 4 | 5 | HERE = pathlib.Path(__file__).parent 6 | README = (HERE / "README.md").read_text() 7 | 8 | setuptools.setup( 9 | name="aws-lambda-publish-shared-event", 10 | version="0.20.0", 11 | entry_points={ 12 | "console_scripts": [ 13 | "publish-shared-event=aws_lambda_publish_shared_event.__main__:main", 14 | "generate-test-event=aws_lambda_publish_shared_event.generate_test_event.__main__:main", 15 | ], 16 | }, 17 | author="Michael Brewer", 18 | license="MIT", 19 | url="https://lambda.101i.de/", 20 | description="Cli to publish shareable Lambda test events.", 21 | long_description=README, 22 | long_description_content_type="text/markdown", 23 | packages=["aws_lambda_publish_shared_event", "aws_lambda_publish_shared_event.generate_test_event"], 24 | install_requires=[ 25 | "boto3 >= 1.34.49", 26 | "botocore >= 1.34.49", 27 | "pick >= 2.2.0", 28 | ], 29 | python_requires=">=3.7", 30 | include_package_data=True, 31 | classifiers=[ 32 | "Development Status :: 4 - Beta", 33 | "Environment :: Console", 34 | "Intended Audience :: Developers", 35 | "License :: OSI Approved :: MIT License", 36 | "Natural Language :: English", 37 | "Operating System :: OS Independent", 38 | "Programming Language :: Python :: 3.7", 39 | "Programming Language :: Python :: 3.8", 40 | "Programming Language :: Python :: 3.9", 41 | "Programming Language :: Python :: 3.10", 42 | ], 43 | project_urls={ 44 | "GitHub": "https://github.com/michaelbrewer/aws-lambda-events", 45 | "Documentation": "https://lambda.101i.de/", 46 | }, 47 | ) 48 | -------------------------------------------------------------------------------- /event-schema/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/michaelbrewer/aws-lambda-events/129e50cd7a78e587c230db2149a86c54c55eb667/event-schema/tests/__init__.py -------------------------------------------------------------------------------- /event-schema/tests/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "One" 3 | } 4 | -------------------------------------------------------------------------------- /event-schema/tests/test_generate_test_event.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | import pytest 4 | 5 | from aws_lambda_publish_shared_event.generate_test_event import __main__ 6 | 7 | SCRIPT_NAME = "foo.py" 8 | 9 | 10 | def test_parse_args_no_args(): 11 | # GIVEN no arguments 12 | sys.argv = [] 13 | 14 | # WHEN calling `generate-test-event` 15 | with pytest.raises(SystemExit) as e: 16 | __main__.main() 17 | 18 | # THEN raise SystemExit 19 | assert str(e.value) == "No event source specified" 20 | 21 | 22 | @pytest.mark.parametrize("argument", ["-l", "--list"]) 23 | def test_parse_args_list(capsys, argument: str): 24 | # GIVEN 25 | sys.argv = [SCRIPT_NAME, argument] 26 | 27 | # WHEN 28 | __main__.main() 29 | 30 | # THEN 31 | captured = capsys.readouterr() 32 | assert captured.out.startswith("List of supported event sources:") 33 | 34 | 35 | def test_generate_event(capsys): 36 | # GIVEN 37 | sys.argv = [SCRIPT_NAME, "ses/ses.json"] 38 | 39 | # WHEN 40 | __main__.main() 41 | 42 | # THEN 43 | captured = capsys.readouterr() 44 | assert captured.out.startswith("{\n") 45 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: AWS Lambda Events 2 | site_description: AWS Lambda Events 3 | site_author: Michael Brewer 4 | repo_name: aws-lambda-events 5 | repo_url: https://github.com/michaelbrewer/aws-lambda-events 6 | edit_uri: edit/main/docs/ 7 | 8 | theme: 9 | name: material 10 | logo: media/aws-logo-light.svg 11 | favicon: media/aws-lambda-1.svg 12 | features: 13 | - navigation.sections 14 | - navigation.expand 15 | - navigation.top 16 | - navigation.instant 17 | - navigation.indexes 18 | - navigation.tabs 19 | - navigation.tracking 20 | - content.code.annotate 21 | palette: 22 | - scheme: default 23 | primary: deep orange 24 | toggle: 25 | icon: material/toggle-switch-off-outline 26 | name: Switch to dark mode 27 | - scheme: slate 28 | primary: green 29 | toggle: 30 | icon: material/toggle-switch 31 | name: Switch to light mode 32 | 33 | markdown_extensions: 34 | - attr_list 35 | - admonition 36 | - def_list 37 | - tables 38 | - meta 39 | - pymdownx.details 40 | - pymdownx.tasklist: 41 | custom_checkbox: true 42 | - pymdownx.highlight: 43 | anchor_linenums: true 44 | - toc: 45 | permalink: true 46 | toc_depth: 4 47 | - pymdownx.inlinehilite 48 | - pymdownx.snippets 49 | - pymdownx.superfences: 50 | custom_fences: 51 | - name: mermaid 52 | class: mermaid 53 | format: !!python/name:pymdownx.superfences.fence_code_format 54 | - pymdownx.tabbed: 55 | alternate_style: true 56 | 57 | plugins: 58 | - git-revision-date 59 | - search 60 | 61 | extra: 62 | analytics: 63 | provider: google 64 | property: G-PM4TKP5NNF 65 | 66 | nav: 67 | - Overview: 68 | - index.md 69 | - lambda-resources.md 70 | - lambda-invoke-types.md 71 | - lambda-context.md 72 | - lambda-lifecycle.md 73 | - lambda-security.md 74 | - AWS Lambda Events: 75 | - http-api.md 76 | - http-api-custom-authorizer.md 77 | - rest-api.md 78 | - rest-api-custom-authorizer.md 79 | - function-url.md 80 | - alexa-skills-kit.md 81 | - alexa-smart-home.md 82 | - alb.md 83 | - appsync-resolver.md 84 | - appsync-authorizer.md 85 | - cloudformation.md 86 | - cloudfront-function.md 87 | - cloudfront-lambda-edge.md 88 | - cloudwatch-logs.md 89 | - code-commit.md 90 | - code-pipeline-job.md 91 | - cognito-events.md 92 | - cognito-user-pool.md 93 | - config.md 94 | - connect.md 95 | - dynamodb.md 96 | - event-bridge.md 97 | - iot-events.md 98 | - iot.md 99 | - apache-kafka.md 100 | - kinesis-firehose.md 101 | - kinesis-streams.md 102 | - lex.md 103 | - lex-v2.md 104 | - mq.md 105 | - amazon-msk.md 106 | - s3.md 107 | - s3-batch.md 108 | - s3-object-lambda.md 109 | - secrets-manager.md 110 | - ses.md 111 | - sns.md 112 | - sqs.md 113 | - work-mail.md 114 | - build-project.md 115 | --------------------------------------------------------------------------------