Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automatically install an SSL cert on an AWS ElasticBeanstalk running on Windows & .NET?

Is there a way to automatically deploy a .NET/Windows based Amazon Elastic Beanstalk instance with an SSL cert?

I already have the DNS for the domain in the SSL cert setup to point to the Beanstalk instance.

I can remote in and configure the server manually but I was wondering if there is a way to make it part of the deployment package (similar to what Windows Azure has).

If this isn't built in to Elastic Beanstalk, are there any hooks to run PowerShell scripts after deployment (or update) of my instance?

like image 354
gmetzker Avatar asked Oct 09 '12 00:10

gmetzker


1 Answers

The AWS Elastic Beanstalk Developer Guide explains how to enable an SSL certificate for your Elastic Beanstalk environment.
The relevant part is:

Controlling the HTTPS port

Elastic Load Balancing supports the HTTPS/TLS protocol to enable traffic encryption for client connections to the load balancer. Connections from the load balancer to the EC2 instances are done using plaintext. By default, the HTTPS port is turned off.

To turn on the HTTPS port

  • Create and upload a certificate and key to the AWS Access and Identity Management (AWS IAM) service. The IAM service will store the certificate and provide an Amazon Resource Name (ARN) for the SSL certificate you've uploaded. For more information creating and uploading certificates, see the Managing Server Certificates section of Using AWS Identity and Access Management.

  • Specify the HTTPS port by selecting a port from the HTTPS Listener Port drop-down list.

  • In the SSL Certificate ID text box, enter the Amazon Resources Name (ARN) of your SSL certificate (e.g., arn:aws:iam::123456789012:server-certificate/abc/certs/build). Use the SSL certificate that you created and uploaded in step 1. For information on viewing the certificate's ARN, see Verify the Certificate Object topic in the Creating and Uploading Server Certificates section of the Using IAM Guide.

like image 124
Wade Matveyenko Avatar answered Nov 15 '22 06:11

Wade Matveyenko