My application uses the WebSocket protocol, and I want to deploy it to the AWS using AWS Elastic Beanstalk. But the pre-build Windows Server configuration not including this protocol by default.
Manually i can enable it by setting according item in the Server Manager via Add Roles and Features Wizard (Web Server (IIS) -> Web Server -> Application Development -> Web Socket Protocol).
If I want my app to work, i need connect by RDP and manually check in this option. But it is a terrible approach..
I think this task can be accomplished by deploy setting (.ebextensions)? But how can i get it?
I would be very grateful for the answer!
Add .ebextensions to your EB environment and customize your server software
You may want to customize and configure the software that your application depends on. These files could be either dependencies required by the application—for example, additional packages or services that need to be run.
For your needs use commands
option:
Use the commands key to execute commands on the EC2 instance. The commands are processed in alphabetical order by name, and they run before the application and web server are set up and the application version file is extracted.
The specified commands run as the Administrator user.
For example this command will install WebSocket protocol feature:
%SystemRoot%\system32\dism.exe /online /enable-feature /featurename:IIS-WebSockets
in .ebextensions config it may look like:
commands:
01_install_websockets_feature:
command: "%SystemRoot%\\System32\\dism.exe /online /enable-feature /featurename:IIS-WebSockets"
ignoreErrors: true