Release: AWS SDK for .NET 1.3.18

Release Notes>.NET>Release: AWS SDK for .NET 1.3.18
This release adds support for multi-object delete and use of temporary security credentials with pre-signed urls in Amazon S3; instance status, reserved instance options and virtual gateway features in Amazon EC2; Elastic Load Balancing in Amazon VPC and the cost estimator and UpdateStack operations in AWS CloudFormation.

Details

Submitted By: Pavel@AWS
Release Date: December 8, 2011 2:55 AM GMT
Created On: December 8, 2011 2:55 AM GMT
Last Updated: December 8, 2011 2:55 AM GMT

Download

Download the latest AWS SDK for .NET

New Features

Change Description
Multi-Object Delete in Amazon S3

You can now delete multiple Amazon S3 objects using a single request:

            string[] objKeys = { ... };
            var request = new DeleteObjectsRequest().WithBucketName("bucketName");
            foreach (string objKey in objKeys)
            {
                request.AddKey(objKey);
            }
            
            try
            {                                                                     
                var response = s3Client.DeleteObjects(request);
                Console.WriteLine("All objects deleted successfully.");
            }
            catch (DeleteObjectsException e)
            {
                Console.WriteLine("Some or all of the objects could not be deleted.");
                var errorResponse = e.ErrorResponse;
                foreach (var failedObj in errorResponse.DeleteErrors)
                {
                    Console.WriteLine("Delete failed - " + failedObj.Key);
                }
                
                foreach (var deletedObj in errorResponse.DeletedObjects)
                {
                    Console.WriteLine("Delete succeeded - " + deletedObj.Key);
                }
            }
      

Objects to delete can be identified using a key or a key and version.

To learn more, please visit the Amazon Simple Storage Service (Amazon S3) page.

Amazon S3 Pre-signed Urls and Temporary Credentials

You can now use temporary security credentials when generating pre-signed urls with Amazon S3:

            AmazonSecurityTokenService stsClient = new AmazonSecurityTokenServiceClient("accessKey", "secretKey");
            var credentials = stsClient.GetSessionToken(new GetSessionTokenRequest()).GetSessionTokenResult.Credentials;
            var sessionCredentials = new SessionAWSCredentials(credentials.AccessKeyId, credentials.SecretAccessKey, credentials.SessionToken);
            var s3Client = new AmazonS3Client(sessionCredentials)
            
            var request = new GetPreSignedUrlRequest().WithBucketName("bucketName")
                                                      .WithKey("myKey");
                                                      .WithExpires(DateTime.Now.AddMinutes(5));
                                                      .WithProtocol(Protocol.HTTP);
            string presignedUrl = s3client.GetPreSignedURL(request);
      
Amazon EC2 Instance Status

Instance Status provides information about two types of scheduled events for one or more instances in the running state - scheduled reboot and scheduled retirement. When Amazon EC2 determines that an instance must be rebooted, the instance.s status will return one of two event codes: system-reboot or instance-reboot. When Amazon EC2 determines that an instance must be shut down, the instance.s status will return an event code called instance-retirement.

            var request = new DescribeInstanceStatusRequest().WithInstanceId("instanceID");
            DescribeInstanceStatusResponse response = ec2Client.DescribeInstanceStatus(request);
            
            InstanceStatus instanceStatus = response.DescribeInstanceStatusResult.InstanceStatus[0];
            Console.WriteLine("Availability zone - " + instanceStatus.AvailabilityZone);
            Console.WriteLine("Instance State Code - " + instanceStatus.InstanceState.Code);
            Console.WriteLine("Instance State Name - " + instanceStatus.InstanceState.Name);
            
            foreach (InstanceStatusEvent statusEvent in instanceStatus.InstanceStatusEvent)
            {
                Console.WriteLine("Event Code - " + statusEvent.Code);
                Console.WriteLine("Event Description - " + statusEvent.Description);
                Console.WriteLine("Earliest Scheduled Start Time - " + statusEvent.NotBefore);
                Console.WriteLine("Latest Scheduled End Time - " + statusEvent.NotAfter);
            }            
      

For more information, see the Amazon EC2 Instance Status release notes.

Amazon EC2 Reserved Instance Options

Starting with the 2011-11-01 API version, AWS expanded its offering of Amazon EC2 Reserved Instances to address a range of projected instance use. There are three types of Reserved Instances based on customer utilization levels: Heavy Utilization, Medium Utilization, and Light Utilization. You determine the type of the Reserved Instances offerings by including the optional offeringType parameter when calling DescribeReservedInstancesOfferings.

The Medium Utilization offering type is equivalent to the Reserved Instance offering available before API version 2011-11-01. If you are using tools that predate the 2011-11-01 API version, DescribeReservedInstancesOfferings will only list information about the Medium Utilization Reserved Instance offering type.

For more information, see the Amazon EC2 Reserved Instances Options release notes.

Amazon EC2 Virtual Private Gateway Support

The VpnConnection type returned by the CreateVpnConnection and DescribeVpnConnection operations has been extended to include information about virtual private gateways for the instance. This can be accessed using the new VgwTelemetry member which returns a collection of VpnTunnelTelemetry instances containing the gateway information.

To learn more, please visit the Amazon Elastic Compute Cloud (Amazon EC2) page.

AWS CloudFormation Cost Estimator

The estimated monthly cost of a template can now be viewed using the new EstimateTemplateCost operation. The return value is a URL to an AWS Simply Monthly Calculator with the query string set to the resources required to run the template:

            string templateText = "{...template...}";
            var request = new EstimateTemplateCostRequest()..WithTemplateBody(templateText);
            EstimateTemplateCostResponse response = cfClient.EstimateTemplateCost(request);
            /*... operate on response.EstimateTemplateCostResult.Url ...*/
      

To learn more, please visit the AWS CloudFormation page.

AWS CloudFormation UpdateStack

You can now use CloudFormation to modify and update the resources in your existing stacks in a controlled and predictable way. By using templates to manage your stack changes, you have the ability to version control your AWS infrastructure in the same way as you version control the software running on it.

            List<Parameter> deltaParam = new List<Parameter>();
            deltaParam.Add(new Parameter().WithParameterKey("InstanceType").WithParameterValue("t1.micro"));
            var request = new UpdateStackRequest().WithTemplateURL("templateUrl")
                                                  .WithStackName("stackName")
                                                  .WithParameters(deltaParam)
            UpdateStackResponse response = cfClient.UpdateStack(request);
      

To learn more, please visit the AWS CloudFormation page.

Elastic Load Balancing in Amazon VPC

You can now use Elastic Load Balancing with Amazon Virtual Private Cloud (VPC). The same easy-to-use features of Elastic Load Balancing are available in VPC, such as SSL termination, health checks, sticky sessions, and CloudWatch monitoring. In addition to these features, when you provision an Elastic Load Balancer for your VPC, you can now assign security groups to your Elastic Load Balancer.

To learn more, please visit the Elastic Load Balancing and Amazon Virtual Private Cloud (Amazon VPC) pages.

Known Issues

Issue Description
Installation Requires Administrator Privileges The default install location is %PROGRAMFILES%, which on most computers is "c:\program files". In order to install files to the default location, the MSI must be run by an Administrator. If you don't have Administrator privileges on the machine, please change the install location to something like "c:\Documents and Settings\<you>\AWS SDK for .NET", and the install will complete successfully. If you are running on Vista, your personal folder is similar to "c:\users\<you>\".
Uninstalling the SDK Produces "Unknown Publisher" Message On Windows Vista, uninstalling the MSI results in an "Unknown Publisher" dialog even though the installer is signed by Amazon Web Services. This is a known Windows Installer bug on Windows Vista, and is documented here: http://support.microsoft.com/kb/929467/en-us

Supported API Versions

This release of the SDK supports the following API versions:

Service API Version
Amazon CloudFront 2010-11-01
Amazon CloudWatch 2010-08-01
Amazon Elastic Compute Cloud 2011-11-01
Amazon Elastic MapReduce 2009-03-31
Amazon ElastiCache 2011-07-15
Amazon Relational Database Service 2011-04-01
Amazon Simple Email Service 2010-12-01
Amazon Simple Notification Service 2010-03-31
Amazon Simple Queue Service 2011-10-01
Amazon Simple Storage Service 2006-03-01
Amazon SimpleDB 2009-04-15
Auto Scaling 2011-01-01
AWS CloudFormation 2010-05-15
AWS Elastic Beanstalk 2010-12-01
AWS Identity and Access Management 2010-05-08
AWS Import/Export 2010-06-01
AWS Security Token Service 2011-06-15
Elastic Load Balancing 2011-11-15
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.