The intention of this blog is to quickly understand how to publish a map service from our computer to the Arcgis online cloud (agol hereafter).
The first thing we must do is open arcgis desktop and open the layer with the software. Once we have added the layer, we log in. To do this, go to File > Sign In (see image below):

When we click on sign in, this will open the panel for us to enter the AGOL user credentials.

Once logged in, we go to File > Share As > Service (File/Share As/Service) (See image below).

After these steps, the publishing wizard will open. This wizard will guide us through the steps to configure our service in the cloud.
The first option that appears is 1. publish a service, 2. Save as a service definition, and 3. Overwrite a service; in this case, we click on publish a service and then next (see image below).

Once we do this, we must choose a connection to make the publication; remember it is the same process to publish services on the Server. In our case, we choose the connection to the AGOL cloud and then assign a name to our service and click continue (see images below).


To finish, it opens the dialog box of parameters that our map service will have once published. These parameters can be configured specifically depending on the needs with the Map Service.
Thus, we have the tabs Parameters, Capabilities, Item Description, and Share (see image).

- In the parameters tab, we leave it as is; basically here you can only configure the number of returns in specific cases. If you need more information about this tab (anti-Aliasing) see this link.
- The Capabilities allow us to give specific functionalities to web services. Tile or feature maps can be published. In our case, only access to features should be enabled. Note: To publish tile services soon you will be able to see how it is done at this link

Access to features gives us the possibility to configure the service depending on what is required. Thus, if for example we need to edit it, this functionality is configured here.

Here you select the operations allowed with this service.
- Create: Adding new elements is allowed.
- Delete: Elements are deleted.
- Query: searches are made with fields.
- Sync: This service can be synchronized with applications that download content (example: work with collector offline).
- Update: update fields of already created elements.
After this, an item description is made; this is very important since many times many versions of the same service are made and through this changes can be identified (see image below).

Sharing gives us the possibility to assign this service to specific groups or organizations.

Finally, we can Analyze the service to share and if there are no errors to resolve, click Publish.

This starts the process of copying the layer to the cloud and creating the online service.

After publishing the layer, we can review the hosted layer and create our web maps.