Using AWS CLI from EC2 instance without internet a

2019-07-03 15:34发布

问题:

Is there a way to use AWS CLI to call different services such as SQS, EC2, SNS from EC2 linux instance?
The EC2 instance from where the AWS CLI command are invoked does not have access to internet. It is in private subnet. It is not using internet gateway or NAT.

Thanks,

回答1:

Not possible. The CLI has to access the API endpoints for all the services you mentioned. For that the CLI needs internet access. Only service it can access without internet is the internal metadata server.

AWS Regions and Endpoints



回答2:

VPC endpoints create a private connection between your VPC and an AWS service. However, currently the only supported service is S3 and none of the services listed in your question.

Currently, we support endpoints for connections with Amazon S3 only. We'll add support for other AWS services later. Endpoints are supported within the same region only.