Deploy WPF app in AWS S3 and SQL Server in RDS.

Ravi Aakula
3 min readNov 1, 2018

--

Initially i thought, i require to launch an EC2 instance to deploy WPF click once into IIS. Then i moved onto AWS ECS containers, but later i realized we can deploy click once as static website in S3. This will help us to save time and money.

  • Create a new S3 Bucket .
  • Select “Use this bucket as Static website” in section “Static website” of bucket properties and enter “publish.htm” at index document.
  • By default S3 bucket is private. You can add bucket policy of this S3 bucket permissions , so that users from specified ip addresses can access static website. Or implement SSO on this bucket using IAM Identity provider.
{
"Version": "2012-10-17",
"Id": "S3PolicyId1",
"Statement": [
{
"Sid": "IPAllow",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::wpf-bucket/*",
"Condition": {
"IpAddress": {
"aws:SourceIp": "10.10.10.0/24"
}
}
}
]
}
  • Note down static website endpoint url.
  • Change Installation Folder URL to static website url in pubhish properties of WPF application and pubhish to local folder.
  • Upload punished folder content to S3 bucket and browse the URL. Click on “launch” url to download and install application in windows machine.

Migrate on premises SQL Server to AWS RDS

  • Create RDS SQL Server instances with required storage.
  • You can use backup files to migrate from on premises to AWS RDS.
  • If backup files are not allowed in your organization , we followed sql server import export database option in SQL Server Management Studio.
  • By default, SQL Server exposes on port 1443, but most of the organizations blocks this port range in firewall. So we used 8080 port to launch RDS instance.

There are lot of articles in online how to deploy or migrate existing SQL Server database to cloud infrastructure. I am not gonna spend much time here.

I hope these simple trick and how to do steps might help you to save some time.

--

--