Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterised AWS access/secret key gives UnrecognizedClientException #25

Open
bdocrex opened this issue Dec 1, 2022 · 0 comments
Open

Comments

@bdocrex
Copy link

bdocrex commented Dec 1, 2022

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.

@bdocrex bdocrex changed the title Cross account deploy gives UnrecognizedClientException Parameterised AWS access/secret key gives UnrecognizedClientException Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant