Creating an Internet Service

You can create an Internet gateway that you can then attach to a Net to connect virtual machines (VMs) in one or more Subnets directly to the Internet.

To do so, you also need to add a route to the route table of these Subnets directing Internet traffic to the Internet gateway and update your security groups. For more information, see Tutorial: Setting Up a Direct Connection Between VMs in a Net and the Internet.

Creating an Internet Service Using Cockpit v2

  1. In the Internet Services dashboard, click IconAddFull Create Internet Service.
    The CREATE INTERNET SERVICE dialog box appears.

  2. In the Name field, type a name for the Internet service.

    This action adds a Name tag of 255 characters maximum. You can use any character, including accented letters.

  3. Click Create Internet Service.
    The Internet Service is created.

Creating an Internet Service Using OSC CLI

The CreateInternetService command creates an Internet service you can use with a Net.
An Internet service enables virtual machines (VMs) launched in a Net to connect to the Internet. It allows routing of incoming and outgoing Internet traffic and management of public IP addresses.

For more information, see About Internet Services.

Request sample
$ osc-cli api CreateInternetService --profile "default"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

The CreateInternetService command returns the following elements:

  • InternetService: Information about the Internet service.

    • InternetServiceId: The ID of the Internet service.

    • NetId: The ID of the Net attached to the Internet service.

    • State: The state of the attachment of the Internet service to the Net (always available).

    • Tags: One or more tags associated with the Internet service.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  "InternetService": {
    "Tags": [],
    "InternetServiceId": "igw-12345678"

Creating an Internet Gateway Using AWS CLI

To create an Internet gateway, use the create-internet-gateway command following this syntax:

Request sample
$ aws ec2 create-internet-gateway \
    --profile YOUR_PROFILE \

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The create-internet-gateway command returns the following elements:

  • InternetGateway: Information about the newly created Internet gateway. This element contains the following information:

    • Tags: One or more tags associated with the Internet gateway.

    • InternetGatewayId: The ID of the Internet gateway.

    • Attachments: Information about the attachment to a VPC (always empty at creation).

Result sample
    "InternetGateway": {
        "Tags": [],
        "InternetGatewayId": "igw-12345678",
        "Attachments": []

The Internet gateway is created.

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.