I have created a S3 bucket and uploaded the two files to the bucket via AWS .Net SDK, I can access files with HTTP, but I need access the files with HTTPS (SSL Secured) for that I have created the certificate request using the RequestCertificateAsync
method of AmazonCertificateManagerClient
, but I couldn't find a way to assign the created certificate to the specific bucket via programmatically.
This is the code I have used to request the certificate
public static void CertificateCreation()
{
AmazonCertificateManagerConfig acmConfig = new AmazonCertificateManagerConfig();
var credentials = new BasicAWSCredentials(accessKeyID, secretKey);
acmConfig.RegionEndpoint = Amazon.RegionEndpoint.USWest1;
AmazonCertificateManagerClient client = new AmazonCertificateManagerClient(credentials, acmConfig);
RequestCertificateRequest request = new RequestCertificateRequest()
{
CertificateAuthorityArn = "arn-value",
DomainName = "damain_name",
ValidationMethod = "DNS",
};
var response = client.RequestCertificateAsync(request);
while (TaskStatus.Created == client.RequestCertificateAsync(request).Status)
{
Console.WriteLine("Change is pending.");
Thread.Sleep(15000);
}
}
I doesn't have idea to move further, to assign the SSL certificate to specific bucket. Is anyone can help to accomplish this task much appreciated.