How to limit aws instance ip range generated by ec2-instance create cli script?

In my jenkins environment, i have configured the AWS cli, which generates the AWS instance on the run using “ec2-run-instances” command. On this i create docker and run it. However, occassionally i need to debug the generated instance manually. Now the issue is that i am working in a secured environment, where access to unknown instances is blocked by default as per corporate security policies. So i could not login to generated aws linux instance.
I want to know, what can be the best way to handle this situation? Is there an option, using which i can specify aws instance would pickup from particular ip range?
Thanks in advance

  • Ansible docker_container 'no Host in request URL', docker pull works correctly
  • Dockerfile Script for Amazon AWS
  • App running in Docker on EB refuses connecting to self
  • Codeship: Deploying to EC2 Container Service from Docker Image
  • Docker containers on AWS
  • Docker: ECS vs Beanstalk vs Docker Cloud
  • mysql docker container get remote host: Connection refused after container running
  • Performance and reliability when using multiple Docker containers VS standard Node cluster
  • how to mount the nginx docker container into host using Ansible Playbook?
  • How to serve static content in a Node Express container with Docker?
  • Cannot install packages inside docker Ubuntu image
  • Nginx + php-fpm: Bad gateway only when xdebug server is running
  • One Solution collect form web for “How to limit aws instance ip range generated by ec2-instance create cli script?”

    What you are looking here requires configuration of a VPC – and run all your EC2 instances in it. A VPC can consist of one or more subnets – and be configured to how an IP range.

    During the launch of an EC2 instance (manually or through CLI) – you can specify a subnet. The new EC2 instance will only come up in that IP range.

    Depending on what you need, you can pick the VPC scenario

    (complexity increases from 1-3)

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.