This work aims to obtain an optimal control strategy for an epidemiological model of the COVID-19 pandemic at the State of Amazonas, Brazil. Firstly, it was identified a mathematical model that describes the dynamics of coronavirus propagation at Amazonas. In order to identify the model, it was chosen a SIR type, whose parameters were estimated using a gray box identification method for different scenarios: from August to November 2020 and from January to March 2021. After parameters’ estimation, the identified model was validated concerning two different aspects. The first one was to validate the autonomous model, i.e., without the control input. Data were divided into estimation data and validation data. Model was identified using the estimation data and, then, simulated data through that model was compared with the validation data. Results show good agreement between model and validation data, with a fit index above 94% for all state variables. The second validation aspect was through the simulation of real vaccination data on the model. It was expected that the state variables S (susceptibles), I (infected) and R (removed) obtained with simulation would reproduce the actual state variables obtained through the database. Results of the simulated states S (susceptibles), I (infected) and R (removed) were compared with real data of these state variables and showed promising results with fit index of more than 96%. Then, the optimal control problem was formulated and a performance index was chosen to minimize the cost associated with infection cases and pandemic control actions over the population. The characterization of the optimal solution was accomplished by using the Pontryagin principle approach, restricting the final time of the control horizon. Finally, numerical solutions of state and co-state equations were obtained applying the forward and backward sweep method. Results show a good agreement with real data, and the optimal control strategy proposed indicates a good method to formulate governmental actions capable of minimizing infections while rationalizing the amount of vaccines.