Skip to content

AWS SSM integration creates a significant number of CloudTrail errors. #2144

Closed as not planned

Description

@charlieoleary

Bug Report

We're using the SSM integration, which has been great. However, ever since integrating it I noticed a significant uptick in CloudWatch errors. As shown below, our daily reporting shows hundreds of thousands GetParameter errors a day (!!!).

image

I looked into our CloudTrail logs and found the following --

{
    "eventVersion": "1.04",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "<REDACT>",
        "arn": "arn:aws:sts::<REDACT>:assumed-role/<REDACT>/<REDACT>",
        "accountId": "<REDACT>",
        "accessKeyId": "<REDACT>",
        "sessionContext": {
            "attributes": {
                "mfaAuthenticated": "false",
                "creationDate": "2018-04-10T12:33:53Z"
            },
            "sessionIssuer": {
                "type": "Role",
                "principalId": "<REDACT>",
                "arn": "arn:aws:iam::<REDACT>:role/<REDACT>",
                "accountId": "<REDACT>",
                "userName": "lever-ci"
            }
        }
    },
    "eventTime": "2018-04-10T17:44:48Z",
    "eventSource": "ssm.amazonaws.com",
    "eventName": "GetParameter",
    "awsRegion": "us-west-2",
    "sourceIPAddress": "<REDACT>",
    "userAgent": "aws-sdk-go/1.12.49 (go1.9.4; linux; amd64)",
    "errorCode": "ParameterNotFound",
    "errorMessage": "Parameter /concourse/<TEAM>/<PIPELINE>/<VARIABLE> not found.",
    "requestParameters": {
        "name": "/concourse/<TEAM>/<PIPELINE>/<VARIABLE>",
        "withDecryption": true
    },
    "responseElements": null,
    "requestID": "dd1d753a-3ce6-11e8-91ee-ad03259f206a",
    "eventID": "c43cb1b8-ff9b-426c-9554-a813e4f06476",
    "readOnly": true,
    "resources": [
        {
            "ARN": "arn:aws:ssm:us-west-2:<REDACT>:parameter/<TEAM>/<PIPELINE>/<VARIABLE>",
            "accountId": "<REDACT>"
        }
    ],
    "eventType": "AwsApiCall",
    "recipientAccountId": "<REDACT>"
}

We use team-level secrets for almost everything (parameter//), which Concourse does successfully find. However, it still seems to attempt to find the pipeline-level variable regardless (or in reverse order?). Either way, this creates a ton of noise in CloudWatch.

Ideally, you would be to tell Concourse the preferred order for finding secrets, and once it finds a secret in one place, not search for it in another. Even more ideally this could be specified by pipeline. For example --

variables:
  source: ssm
  preferred: <team|pipeline>

resources:
  ...

jobs:
  ...

If I specify team as the preferred method, it should search for /concourse/<team>/<variable> first, and if that failed it would then check for /concourse/<team>/<pipeline>/<variable> instead.

  • Concourse version: v3.9.0
  • Deployment type (BOSH/Docker/binary): Binary
  • Infrastructure/IaaS: AWS

Activity

  1. changed the title [-]AWS SSM integration creates a significant number of CloudWatch errors.[/-] [+]AWS SSM integration creates a significant number of CloudTrail errors.[/+] on Apr 10, 2018
  2. xtremerui commented on Nov 22, 2023

    @xtremerui
    Contributor

    Hi I believe the way Concourse looking up secret has not changed, so is there any change on SSM side that would ignore the poke as not an error?

    I think this should be a feature request too. Thx!

  3. taylorsilva commented on Jan 6, 2025

    @taylorsilva
    Member

    Issue Bankruptcy

    This issue is being closed as part of 2025's Issue Bankruptcy declaration. See here for details

    If you think this issue still has merit then feel free to open a new issue and reference this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions