aws / aws/aws-codedeploy-agent

CodeDeplot Access denied when calling "codedeploy-commands.eu-central-1.amazonaws.com:443"

Open
#374 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
337
Forks
195
Avg merge
10h 54m
Merged PRs (30d)
4

Description

So, pretty much as reported in the title. Here's the log: `<- "POST / HTTP/1.1\r\nContent-Type: application/x-amz-json-1.1\r\nAccept-Encoding: \r\nUser-Agent: aws-sdk-ruby3/3.121.1 ruby/3.2.2 x86_64-linux aws-sdk-codedeploycommand/1.0.0\r\nX-Amz-Target: CodeDeployCommandService_v20141006.PollHostCommand\r\nX-Amz-Codedeploy-Agent-Version: OFFICIAL_1.6.0-49_rpm\r\nHost: codedeploy-commands.eu-central-1.amazonaws.com\r\nX-Amz-Date: 20230806T094049Z\r\nX-Amz-Content-Sha256: \r\nAuthorization: AWS4-HMAC-SHA256 Credential=/20230806/eu-central-1/codedeploy-commands/aws4_request, SignedHeaders=content-type;host;x-amz-codedeploy-agent-version;x-amz-content-sha256;x-amz-date;x-amz-target, Signature=\r\nContent-Length: 87\r\nAccept: */*\r\n\r\n"
<- "{\"HostIdentifier\":\"arn:aws:ec2:eu-central-1:013474097611:instance/i-01e394a844f7a96e9\"}"
-> "HTTP/1.1 400 Bad Request\r\n"
-> "x-amzn-RequestId: 67ecf932-8e90-4ae3-992c-675e003c9fd2\r\n"
-> "Date: Sun, 06 Aug 2023 09:40:49 GMT\r\n"
-> "Content-Type: application/x-amz-json-1.1\r\n"
-> "Content-Length: 34\r\n"
-> "connection: keep-alive\r\n"
-> "\r\n"
reading 34 bytes...
-> "{\"__type\":\"AccessDeniedException\"}"
read 34 bytes
Conn keep-alive
I, [2023-08-06T09:40:49.082646 #2820] INFO -- : [Aws::CodeDeployCommand::Client 400 0.06012 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:eu-central-1:013474097611:instance/i-01e394a844f7a96e9") Aws::CodeDeployCommand::Errors::AccessDeniedException Aws::CodeDeployCommand::Errors::AccessDeniedException
`

EDIT:

Here is the trust relationship of the IAM Role for this instance:

`{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "codedeploy.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.