{"action":"created","issue":{"url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/440","repository_url":"https://api.github.com/repos/test-kitchen/kitchen-ec2","labels_url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/440/labels{/name}","comments_url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/440/comments","events_url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/440/events","html_url":"https://github.com/test-kitchen/kitchen-ec2/issues/440","id":394974779,"node_id":"MDU6SXNzdWUzOTQ5NzQ3Nzk=","number":440,"title":"The request must contain the parameter AWSAccessKeyId (Aws::EC2::Errors::MissingParameter)","user":{"login":"marty-macfly","id":12715929,"node_id":"MDQ6VXNlcjEyNzE1OTI5","avatar_url":"https://avatars1.githubusercontent.com/u/12715929?v=4","gravatar_id":"","url":"https://api.github.com/users/marty-macfly","html_url":"https://github.com/marty-macfly","followers_url":"https://api.github.com/users/marty-macfly/followers","following_url":"https://api.github.com/users/marty-macfly/following{/other_user}","gists_url":"https://api.github.com/users/marty-macfly/gists{/gist_id}","starred_url":"https://api.github.com/users/marty-macfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marty-macfly/subscriptions","organizations_url":"https://api.github.com/users/marty-macfly/orgs","repos_url":"https://api.github.com/users/marty-macfly/repos","events_url":"https://api.github.com/users/marty-macfly/events{/privacy}","received_events_url":"https://api.github.com/users/marty-macfly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-31T12:38:12Z","updated_at":"2018-12-31T16:06:20Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI've discover an issue on kitchen-ec2 version 2.4.0. My kitchen are run in a container when i'm running `kitchen diagnose` on alpine:3.7, everything is ok.\r\n\r\nI've moved my container to alpine:3.8 since that change, I'm having the following issue when running `kitchen diagnose`:\r\n\r\n```\r\nTraceback (most recent call last):\r\n\t40: from /usr/bin/kitchen:23:in `<main>'\r\n\t39: from /usr/bin/kitchen:23:in `load'\r\n\t38: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/bin/kitchen:13:in `<top (required)>'\r\n\t37: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/errors.rb:171:in `with_friendly_errors'\r\n\t36: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/bin/kitchen:13:in `block in <top (required)>'\r\n\t35: from /usr/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'\r\n\t34: from /usr/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'\r\n\t33: from /usr/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'\r\n\t32: from /usr/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'\r\n\t31: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/cli.rb:142:in `diagnose'\r\n\t30: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/cli.rb:52:in `perform'\r\n\t29: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/command/diagnose.rb:38:in `call'\r\n\t28: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/diagnostic.rb:52:in `read'\r\n\t27: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/diagnostic.rb:125:in `prepare_instances'\r\n\t26: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/diagnostic.rb:125:in `each'\r\n\t25: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/diagnostic.rb:125:in `block in prepare_instances'\r\n\t24: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/instance.rb:257:in `diagnose'\r\n\t23: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/instance.rb:257:in `each'\r\n\t22: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/instance.rb:259:in `block in diagnose'\r\n\t21: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/configurable.rb:120:in `diagnose'\r\n\t20: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/configurable.rb:120:in `each'\r\n\t19: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/configurable.rb:120:in `block in diagnose'\r\n\t18: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/lazy_hash.rb:76:in `[]'\r\n\t17: from /usr/lib/ruby/gems/2.5.0/gems/test-kitchen-1.24.0/lib/kitchen/lazy_hash.rb:143:in `proc_or_val'\r\n\t16: from /usr/lib/ruby/gems/2.5.0/gems/kitchen-ec2-2.4.0/lib/kitchen/driver/ec2.rb:83:in `block in <class:Ec2>'\r\n\t15: from /usr/lib/ruby/gems/2.5.0/gems/kitchen-ec2-2.4.0/lib/kitchen/driver/ec2.rb:381:in `default_ami'\r\n\t14: from /usr/lib/ruby/gems/2.5.0/gems/kitchen-ec2-2.4.0/lib/kitchen/driver/aws/standard_platform.rb:106:in `find_image'\r\n\t13: from /usr/lib/ruby/gems/2.5.0/gems/kitchen-ec2-2.4.0/lib/kitchen/driver/aws/standard_platform.rb:210:in `sort_images'\r\n\t12: from /usr/lib/ruby/gems/2.5.0/gems/kitchen-ec2-2.4.0/lib/kitchen/driver/aws/standard_platform.rb:210:in `sort_by'\r\n\t11: from /usr/lib/ruby/gems/2.5.0/gems/aws-sdk-resources-2.11.197/lib/aws-sdk-resources/collection.rb:18:in `each'\r\n\t10: from /usr/lib/ruby/gems/2.5.0/gems/aws-sdk-resources-2.11.197/lib/aws-sdk-resources/collection.rb:18:in `each'\r\n\t 9: from /usr/lib/ruby/gems/2.5.0/gems/aws-sdk-resources-2.11.197/lib/aws-sdk-resources/operations.rb:139:in `all_batches'\r\n\t 8: from /usr/lib/ruby/gems/2.5.0/gems/aws-sdk-resources-2.11.197/lib/aws-sdk-resources/request.rb:24:in `call'\r\n\t 7: from /usr/lib/ruby/gems/2.5.0/gems/aws-sdk-core-2.11.197/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'\r\n\t 6: from /usr/lib/ruby/gems/2.5.0/gems/aws-sdk-core-2.11.197/lib/seahorse/client/request.rb:70:in `send_request'\r\n\t 5: from /usr/lib/ruby/gems/2.5.0/gems/aws-sdk-core-2.11.197/lib/seahorse/client/plugins/response_target.rb:21:in `call'\r\n\t 4: from /usr/lib/ruby/gems/2.5.0/gems/aws-sdk-core-2.11.197/lib/aws-sdk-core/plugins/response_paging.rb:26:in `call'\r\n\t 3: from /usr/lib/ruby/gems/2.5.0/gems/aws-sdk-core-2.11.197/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'\r\n\t 2: from /usr/lib/ruby/gems/2.5.0/gems/aws-sdk-core-2.11.197/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in `call'\r\n\t 1: from /usr/lib/ruby/gems/2.5.0/gems/aws-sdk-core-2.11.197/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'\r\n/usr/lib/ruby/gems/2.5.0/gems/aws-sdk-core-2.11.197/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call': The request must contain the parameter AWSAccessKeyId (Aws::EC2::Errors::MissingParameter)\r\n```\r\n\r\nThe difference I've found is the ruby version which 2.4 on alpine 3.7\r\n\r\n```\r\nruby --version\r\nruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-linux-musl]\r\n\r\ngem list | grep aws\r\naws-sdk (2.11.197)\r\naws-sdk-core (2.11.197)\r\naws-sdk-resources (2.11.197)\r\naws-sigv4 (1.0.3)\r\n\r\ngem list | grep kitchen\r\nkitchen-docker (2.7.0)\r\nkitchen-ec2 (2.4.0)\r\ntest-kitchen (1.24.0)\r\n```\r\nand 2.5 on alpine 3.8:\r\n\r\n```\r\nruby --version\r\nruby 2.5.2p104 (2018-10-18 revision 65133) [x86_64-linux-musl]\r\n\r\ngem list | grep aws\r\naws-sdk (2.11.197)\r\naws-sdk-core (2.11.197)\r\naws-sdk-resources (2.11.197)\r\naws-sigv4 (1.0.3)\r\n```\r\n\r\nI've tried to enable the debug of kitchen but output is the same on both. And also enable aws-sdk the [wire trace](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/debugging.html). And I can see that the request done on aws is not the same.\r\n\r\nOn version alpine 3.7: \r\n\r\n```\r\nkitchen diagnose centos-7\r\nopening connection to ec2.eu-west-1.amazonaws.com:443...\r\nopened\r\nstarting SSL for ec2.eu-west-1.amazonaws.com:443...\r\nSSL established\r\n<- \"POST / HTTP/1.1\\r\\nContent-Type: application/x-www-form-urlencoded; charset=utf-8\\r\\nAccept-Encoding: \\r\\nUser-Agent: aws-sdk-ruby2/2.11.197 ruby/2.4.5 x86_64-linux-musl resources\\r\\nX-Amz-Date: 20181231T123525Z\\r\\nHost: ec2.eu-west-1.amazonaws.com\\r\\nX-Amz-Content-Sha256: cb0da5743aeabc7994f1ab91253b55cbf743d09b2188af9ab8a56f8\\r\\nAuthorization: AWS4-HMAC-SHA256 Credential=AKIAJULWORCMDGA/20181231/eu-west-1/ec2/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=0b812979d942b4f78021d90d96fead277fd35c0f28c0fb66c2d64f3e\\r\\nContent-Length: 193\\r\\nAccept: */*\\r\\n\\r\\n\"\r\n-> \"HTTP/1.1 200 OK\\r\\n\"\r\n-> \"Content-Type: text/xml;charset=UTF-8\\r\\n\"\r\n-> \"Transfer-Encoding: chunked\\r\\n\"\r\n-> \"Vary: Accept-Encoding\\r\\n\"\r\n-> \"Date: Mon, 31 Dec 2018 12:35:27 GMT\\r\\n\"\r\n-> \"Server: AmazonEC2\\r\\n\"\r\n-> \"\\r\\n\"\r\n-> \"2000\\r\\n\"\r\nreading 8192 bytes...\r\n-> \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<DescribeImagesResponse xmlns=\\\"http://ec2.amazonaws.com/doc/2016-11-15/\\\">\\n    <requestId>c8fda463-4a8b-4569-85ea-341bf7bf8a8a</requestId>\\n    <imagesSet>\\n        <item>\\n            <imageId>ami-192a9460</imageId>\\n            <imageLocation>aws-marketplace/CentOS Linux 7 x86_64 HVM EBS 1708_11.01-b7ee8a69-ee97-4a49-9e68-afaee216db2e-ami-95096eef.4</imageLocation>\\n            <imageState>available</imageState>\\n            <imageOwnerId>679593333241</imageOwnerId>\\n            <creationDate>20\r\n```\r\n\r\nOn 3.8:\r\n\r\n```\r\nkitchen diagnose centos-7\r\nopening connection to ec2.eu-west-1.amazonaws.com:443...\r\nopened\r\nstarting SSL for ec2.eu-west-1.amazonaws.com:443...\r\nSSL established\r\n<- \"POST / HTTP/1.1\\r\\nContent-Type: application/x-www-form-urlencoded; charset=utf-8\\r\\nAccept-Encoding: \\r\\nUser-Agent: aws-sdk-ruby2/2.11.197 ruby/2.5.2 x86_64-linux-musl resources\\r\\nContent-Length: 193\\r\\nAccept: */*\\r\\nHost: ec2.eu-west-1.amazonaws.com\\r\\n\\r\\n\"\r\n-> \"HTTP/1.1 400 Bad Request\\r\\n\"\r\n-> \"Transfer-Encoding: chunked\\r\\n\"\r\n-> \"Date: Mon, 31 Dec 2018 12:35:33 GMT\\r\\n\"\r\n-> \"Connection: close\\r\\n\"\r\n-> \"Server: AmazonEC2\\r\\n\"\r\n-> \"\\r\\n\"\r\n-> \"fc\\r\\n\"\r\nreading 252 bytes...\r\n-> \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<Response><Errors><Error><Code>MissingParameter</Code><Message>The request must contain the parameter AWSAccessKeyId</Message></Error></Errors><RequestID>92781b98-7ea6-4e82-8ef3-c0b1317b9243</RequestID></Response>\"\r\nread 252 bytes\r\nreading 2 bytes...\r\n-> \"\\r\\n\"\r\nread 2 bytes\r\n-> \"0\\r\\n\"\r\n-> \"\\r\\n\"\r\nConn close\r\n```\r\n\r\nI don't have any clue if the issue is on kitchen-ec2 side or on aws-sdk ?"},"comment":{"url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/comments/450662592","html_url":"https://github.com/test-kitchen/kitchen-ec2/issues/440#issuecomment-450662592","issue_url":"https://api.github.com/repos/test-kitchen/kitchen-ec2/issues/440","id":450662592,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDY2MjU5Mg==","user":{"login":"cheeseplus","id":575693,"node_id":"MDQ6VXNlcjU3NTY5Mw==","avatar_url":"https://avatars0.githubusercontent.com/u/575693?v=4","gravatar_id":"","url":"https://api.github.com/users/cheeseplus","html_url":"https://github.com/cheeseplus","followers_url":"https://api.github.com/users/cheeseplus/followers","following_url":"https://api.github.com/users/cheeseplus/following{/other_user}","gists_url":"https://api.github.com/users/cheeseplus/gists{/gist_id}","starred_url":"https://api.github.com/users/cheeseplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheeseplus/subscriptions","organizations_url":"https://api.github.com/users/cheeseplus/orgs","repos_url":"https://api.github.com/users/cheeseplus/repos","events_url":"https://api.github.com/users/cheeseplus/events{/privacy}","received_events_url":"https://api.github.com/users/cheeseplus/received_events","type":"User","site_admin":false},"created_at":"2018-12-31T16:06:20Z","updated_at":"2018-12-31T16:06:20Z","author_association":"NONE","body":"How are you setting credentials? This might be something as silly/easy as the AWS Access Key ID env variable not being set (if that is the auth mechanism)"}}
{"actor":{"display_login":"cheeseplus"}}