Skip to content

Parameterised AWS access/secret key gives UnrecognizedClientException #25

@bdocrex

Description

@bdocrex

Using TeamCity in AWS account A to deploy a CodeDeploy application in AWS account B using access and secret key of authorized user from account B, with the Upload, register and deploy option successfully creates and runs the CodeDeploy deployment in account B.

However, regardless of whether the deployment ultimately succeeds or fails TeamCity reports the following error within seconds of the build detaching from the agent and while the deployment is still in progress.

Exception while updating build status with AWS CodeDeploy: com.amazonaws.services.codedeploy.model.AmazonCodeDeployException: The security token included in the request is invalid. (Service: AmazonCodeDeploy; Status Code: 400; Error Code: UnrecognizedClientException; Request ID: ######; Proxy: null)

To reiterate, this error is seen in TeamCity even when the CodeDeploy deployment was successful.

Further investigation revealed that this error happens when the AWS CodeDeploy build step is applied as a template where the AWS access key and secret are supplied as parameters.

When the same credentials are entered into the build step (overwriting the template) then there is no error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions