I want to create an instance on aws using Docker-Machine, but it doesn't work.

Asked 2 years ago, Updated 2 years ago, 64 views

I try to create an instance of EC2 using docker-machine, but it doesn't work.We look forward to seeing you.

Windows 10 Using the Dokcer Toolbox

Executing Commands

docker-machine create --driver amazonec2 --amazonec2-open-port8000 --amazonec2-region us-east-2 --amazonec2-vpc-id vpc-7c62aa17 --amazonec2-subnet-id subnet-2774e56baws-sandbox

Create ~/.aws/credentials under your home directory

 [default]
aws_access_key_id = XXXXXXX
aws_secret_access_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

~/.aws/config

 [default]
region=us-east-2
output = json

Error Statements

Error setting machine configuration from flags provided:AuthFailure:AWS was not possible to validate the provided access credentials
        status code:401, request id:2831b0fd-84b1-4948-b1d8-0d7216960220

aws docker

2022-09-30 19:43

1 Answers

As far as the error message is concerned, the error has not been authenticated to AWS.First, verify that the configured credentials pass authentication.In other words, check if it is a docker-machine problem or a docker-machine problem.

For example, run awsts get-caller-identity on the shell to see if GetCallerIdentity passes (Reference).

If the authentication does not pass, please investigate the cause.For example, it is known that authentication does not pass when the time on the computer is not synchronized: Set the time for a Linux instance


2022-09-30 19:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.