Releases: aws/aws-sdk-go-v2
AWS SDK for Go 2.0 Developer Preview
We're pleased to announce the Developer Preview release of the AWS SDK for Go 2.0. Many aspects of the SDK have been refactored based on your feedback, with a strong focus on performance, consistency, discoverability, and ease of use. The Developer Preview is here for you to provide feedback, and influence the direction of the AWS SDK for Go 2.0 before its production-ready, general availability launch. Tell us what you like, and what you don't like. Your feedback matters to us. Find details at the bottom of this post on how to give feedback and contribute.
You can safely use the AWS SDK for Go 2.0 in parallel with the 1.x SDK, with both SDKs coexisting in the same Go application. We won’t drop support for the 1.0 SDK any time soon. We know there are a lot of customers depending on the 1.x SDK, and we will continue to support them. As we get closer to general availability for 2.0, we'll share a more detailed plan about how we'll support the 1.x SDK.
What has changed?
Our focus for the 2.0 SDK is to improve the SDK’s development experience and performance, make the SDK easy to extend, and add new features. The changes made in the Developer Preview target the major pain points of configuring the SDK and using AWS service API calls. Check out the SDK for details on pending changes that are in development and designs we’re discussing.
The following are some of the larger changes included in the AWS SDK for Go 2.0 Developer Preview.
SDK configuration
The 2.0 SDK simplifies how you configure the SDK's service clients by using a single Config
type. This simplifies the Session
and Config
type interaction from the 1.x SDK. In addition, we’ve moved the service-specific configuration flags to the individual service client types. This reduces confusion about where service clients will use configuration members.
We added the external package to provide the utilities for you to use external configuration sources to populate the SDK's Config
type. External sources include environmental variables, shared credentials file (~/.aws/credentials
), and shared config file (~/.aws/config
). By default, the 2.0 SDK will now automatically load configuration values from the shared config file. The external package also provides you with the tools to customize how the external sources are loaded and used to populate the Config
type.
You can even customize external configuration sources to include your own custom sources, for example, JSON files or a custom file format.
Use LoadDefaultAWSConfig
in the external package to create the default Config
value, and load configuration values from the external configuration sources.
cfg, err := external.LoadDefaultAWSConfig()
To specify the shared configuration profile load used in code, use the WithSharedConfigProfile
helper passed into LoadDefaultAWSConfig
with the profile name to use.
cfg, err := external.LoadDefaultAWSConfig(
external.WithSharedConfigProfile("gopher")
)
Once a Config
value is returned by LoadDefaultAWSConfig
, you can set or override configuration values by setting the fields on the Config
struct, such as Region
.
cfg.Region = endpoints.UsWest2RegionID
Use the cfg
value to provide the loaded configuration to new AWS service clients.
svc := dynamodb.New(cfg)
API request methods
The 2.0 SDK consolidates several ways to make an API call, providing a single request constructor for each API call. This means that your application will create an API request from input parameters, then send it. This enables you to optionally modify and configure how the request will be sent. This includes, but isn’t limited to, modifications such as setting the Context
per request, adding request handlers, and enabling logging.
Each API request method is suffixed with Request
and returns a typed value for the specific API request.
As an example, to use the Amazon Simple Storage Service GetObject API, the signature of the method is:
func (c *S3) GetObjectRequest(*s3.GetObjectInput) *s3.GetObjectRequest
To use the GetObject API, we pass in the input parameters to the method, just like we would with the 1.x SDK. The 2.0 SDK's method will initialize a GetObjectRequest
value that we can then use to send our request to Amazon S3.
req := svc.GetObjectRequest(params)
// Optionally, set the context or other configuration for the request to use
req.SetContext(ctx)
// Send the request and get the response
resp, err := req.Send()
API enumerations
The 2.0 SDK uses typed enumeration values for all API enumeration fields. This change provides you with the type safety that you and your IDE can leverage to discover which enumeration values are valid for particular fields. Typed enumeration values also provide a stronger type safety story for your application than using string literals directly. The 2.0 SDK uses string aliases for each enumeration type. The SDK also generates typed constants for each enumeration value. This change removes the need for enumeration API fields to be pointers, as a zero-value enumeration always means the field isn’t set.
For example, the Amazon Simple Storage Service PutObject API has a field, ACL ObjectCannedACL
. An ObjectCannedACL
string alias is defined within the s3 package, and each enumeration value is also defined as a typed constant. In this example, we want to use the typed enumeration values to set an uploaded object to have an ACL of public-read
. The constant that the SDK provides for this enumeration value is ObjectCannedACLPublicRead
.
svc.PutObjectRequest(&s3.PutObjectInput{
Bucket: aws.String("myBucket"),
Key: aws.String("myKey"),
ACL: s3.ObjectCannedACLPublicRead,
Body: body,
})
API slice and map elements
The 2.0 SDK removes the need to convert slice and map elements from values to pointers for API calls. This will reduce the overhead of needing to use fields with a type, such as []string
, in API calls. The 1.x SDK's pattern of using pointer types for all slice and map elements was a significant pain point for users, requiring them to convert between the types. The 2.0 SDK does away with the pointer types for slices and maps, using value types instead.
The following example shows how value types for the Amazon Simple Queue Service AddPermission API's AWSAccountIds
and Actions
member slices are set.
svc := sqs.New(cfg)
svc.AddPermission(&sqs.AddPermissionInput{
AWSAcountIds: []string{
"123456789",
},
Actions: []string{
"SendMessage",
},
Label: aws.String("MessageSender"),
QueueUrl: aws.String(queueURL)
})
Release (2024-11-01)
Module Highlights
github.com/aws/aws-sdk-go-v2/service/bedrockagent
: v1.26.0- Feature: Amazon Bedrock Knowledge Bases now supports using application inference profiles to increase throughput and improve resilience.
github.com/aws/aws-sdk-go-v2/service/docdbelastic
: v1.14.0- Feature: Amazon DocumentDB Elastic Clusters adds support for pending maintenance actions feature with APIs GetPendingMaintenanceAction, ListPendingMaintenanceActions and ApplyPendingMaintenanceAction
github.com/aws/aws-sdk-go-v2/service/taxsettings
: v1.6.0- Feature: Add support for supplemental tax registrations via these new APIs: PutSupplementalTaxRegistration, ListSupplementalTaxRegistrations, and DeleteSupplementalTaxRegistration.
Release (2024-10-31)
Module Highlights
github.com/aws/aws-sdk-go-v2/service/amp
: v1.30.0- Feature: Added support for UpdateScraper API, to enable updating collector configuration in-place
github.com/aws/aws-sdk-go-v2/service/autoscaling
: v1.47.0- Feature: Adds bake time for Auto Scaling group Instance Refresh
github.com/aws/aws-sdk-go-v2/service/batch
: v1.47.0- Feature: Add
podNamespace
toEksAttemptDetail
andcontainerID
toEksAttemptContainerDetail
.
- Feature: Add
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2
: v1.41.0- Feature: Add UDP support for AWS PrivateLink and dual-stack Network Load Balancers
github.com/aws/aws-sdk-go-v2/service/glue
: v1.101.0- Feature: Add schedule support for AWS Glue column statistics
github.com/aws/aws-sdk-go-v2/service/sagemaker
: v1.166.0- Feature: SageMaker HyperPod adds scale-down at instance level via BatchDeleteClusterNodes API and group level via UpdateCluster API. SageMaker Training exposes secondary job status in TrainingJobSummary from ListTrainingJobs API. SageMaker now supports G6, G6e, P5e instances for HyperPod and Training.
github.com/aws/aws-sdk-go-v2/service/sesv2
: v1.38.0- Feature: This release enables customers to provide the email template content in the SESv2 SendEmail and SendBulkEmail APIs instead of the name or the ARN of a stored email template.
Release (2024-10-30)
Module Highlights
github.com/aws/aws-sdk-go-v2/service/appsync
: v1.39.0- Feature: This release adds support for AppSync Event APIs.
github.com/aws/aws-sdk-go-v2/service/connect
: v1.115.0- Feature: Updated the public documentation for the UserIdentityInfo object to accurately reflect the character limits for the FirstName and LastName fields, which were previously listed as 1-100 characters.
github.com/aws/aws-sdk-go-v2/service/datasync
: v1.43.0- Feature: AWS DataSync now supports Enhanced mode tasks. This task mode supports transfer of virtually unlimited numbers of objects with enhanced metrics, more detailed logs, and higher performance than Basic mode. This mode currently supports transfers between Amazon S3 locations.
github.com/aws/aws-sdk-go-v2/service/ec2
: v1.187.0- Feature: This release adds two new capabilities to VPC Security Groups: Security Group VPC Associations and Shared Security Groups.
github.com/aws/aws-sdk-go-v2/service/ecs
: v1.49.0- Feature: This release supports service deployments and service revisions which provide a comprehensive view of your Amazon ECS service history.
github.com/aws/aws-sdk-go-v2/service/geomaps
: v1.0.0- Release: New AWS service client module
- Feature: Release of Amazon Location Maps API. Maps enables you to build digital maps that showcase your locations, visualize your data, and unlock insights to drive your business
github.com/aws/aws-sdk-go-v2/service/geoplaces
: v1.0.0- Release: New AWS service client module
- Feature: Release of Amazon Location Places API. Places enables you to quickly search, display, and filter places, businesses, and locations based on proximity, category, and name
github.com/aws/aws-sdk-go-v2/service/georoutes
: v1.0.0- Release: New AWS service client module
- Feature: Release of Amazon Location Routes API. Routes enables you to plan efficient routes and streamline deliveries by leveraging real-time traffic, vehicle restrictions, and turn-by-turn directions.
github.com/aws/aws-sdk-go-v2/service/keyspaces
: v1.15.0- Feature: Adds support for interacting with user-defined types (UDTs) through the following new operations: Create-Type, Delete-Type, List-Types, Get-Type.
github.com/aws/aws-sdk-go-v2/service/networkfirewall
: v1.44.0- Feature: AWS Network Firewall now supports configuring TCP idle timeout
github.com/aws/aws-sdk-go-v2/service/opensearch
: v1.43.0- Feature: This release introduces the new OpenSearch user interface (Dashboards), a new web-based application that can be associated with multiple data sources across OpenSearch managed clusters, serverless collections, and Amazon S3, so that users can gain a comprehensive insights in an unified interface.
github.com/aws/aws-sdk-go-v2/service/opensearchserverless
: v1.17.0- Feature: Neo Integration via IAM Identity Center (IdC)
github.com/aws/aws-sdk-go-v2/service/redshift
: v1.51.0- Feature: This release launches S3 event integrations to create and manage integrations from an Amazon S3 source into an Amazon Redshift database.
github.com/aws/aws-sdk-go-v2/service/redshiftserverless
: v1.24.0- Feature: Adds and updates API members for the Redshift Serverless AI-driven scaling and optimization feature using the price-performance target setting.
github.com/aws/aws-sdk-go-v2/service/route53
: v1.46.0- Feature: This release adds support for TLSA, SSHFP, SVCB, and HTTPS record types.
github.com/aws/aws-sdk-go-v2/service/sagemaker
: v1.165.0- Feature: Added support for Model Registry Staging construct. Users can define series of stages that models can progress through for model workflows and lifecycle. This simplifies tracking and managing models as they transition through development, testing, and production stages.
github.com/aws/aws-sdk-go-v2/service/workmail
: v1.30.0- Feature: This release adds support for Multi-Factor Authentication (MFA) and Personal Access Tokens through integration with AWS IAM Identity Center.
Release (2024-10-29)
Module Highlights
github.com/aws/aws-sdk-go-v2/service/bedrock
: v1.22.0- Feature: Update Application Inference Profile
github.com/aws/aws-sdk-go-v2/service/cleanrooms
: v1.19.0- Feature: This release adds the option for customers to configure analytics engine when creating a collaboration, and introduces the new SPARK analytics engine type in addition to maintaining the legacy CLEAN_ROOMS_SQL engine type.
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs
: v1.43.0- Feature: Added support for new optional baseline parameter in the UpdateAnomaly API. For UpdateAnomaly requests with baseline set to True, The anomaly behavior is then treated as baseline behavior. However, more severe occurrences of this behavior will still be reported as anomalies.
github.com/aws/aws-sdk-go-v2/service/iotfleetwise
: v1.21.0- Feature: Updated BatchCreateVehicle and BatchUpdateVehicle APIs: LimitExceededException has been added and the maximum number of vehicles in a batch has been set to 10 explicitly
github.com/aws/aws-sdk-go-v2/service/redshiftdata
: v1.31.0- Feature: Adding a new API GetStatementResultV2 that supports CSV formatted results from ExecuteStatement and BatchExecuteStatement calls.
github.com/aws/aws-sdk-go-v2/service/sagemaker
: v1.164.0- Feature: Adding
notebook-al2-v3
as allowed value to SageMaker NotebookInstance PlatformIdentifier attribute
- Feature: Adding
Release (2024-10-28)
General Highlights
- Dependency Update: Updated to the latest SDK module versions
Module Highlights
github.com/aws/aws-sdk-go-v2
: v1.32.3- Bug Fix: Improve handling of whitespace (or lack thereof) in sigv4 GetSignedRequestSignature.
github.com/aws/aws-sdk-go-v2/service/mediapackagev2
: v1.19.0- Feature: MediaPackage V2 Live to VOD Harvester is a MediaPackage V2 feature, which is used to export content from an origin endpoint to a S3 bucket.
github.com/aws/aws-sdk-go-v2/service/opensearch
: v1.42.0- Feature: Adds support for provisioning dedicated coordinator nodes. Coordinator nodes can be specified using the new NodeOptions parameter in ClusterConfig.
github.com/aws/aws-sdk-go-v2/service/rds
: v1.89.0- Feature: This release adds support for Enhanced Monitoring and Performance Insights when restoring Aurora Limitless Database DB clusters. It also adds support for the os-upgrade pending maintenance action.
github.com/aws/aws-sdk-go-v2/service/storagegateway
: v1.34.3- Documentation: Documentation update: Amazon FSx File Gateway will no longer be available to new customers.
Release (2024-10-25)
General Highlights
- Dependency Update: Updated to the latest SDK module versions
Module Highlights
github.com/aws/aws-sdk-go-v2/service/bedrockagent
: v1.25.0- Feature: Add support of new model types for Bedrock Agents, Adding inference profile support for Flows and Prompt Management, Adding new field to configure additional inference configurations for Flows and Prompt Management
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs
: v1.42.0- Feature: Adding inferred token name for dynamic tokens in Anomalies.
github.com/aws/aws-sdk-go-v2/service/codebuild
: v1.47.0- Feature: AWS CodeBuild now supports automatically retrying failed builds
github.com/aws/aws-sdk-go-v2/service/lambda
: v1.64.0- Feature: Add TagsError field in Lambda GetFunctionResponse. The TagsError field contains details related to errors retrieving tags.
github.com/aws/aws-sdk-go-v2/service/nimble
: v1.29.0- Feature: Mark service/nimble as deprecated. This service is no longer available for use. See https://aws.amazon.com/nimble-studio/faqs/.
github.com/aws/aws-sdk-go-v2/service/s3
: v1.66.1- Bug Fix: Update presign post URL resolution to use the exact result from EndpointResolverV2
github.com/aws/aws-sdk-go-v2/service/supplychain
: v1.10.0- Feature: API doc updates, and also support showing error message on a failed instance
Release (2024-10-24)
Module Highlights
github.com/aws/aws-sdk-go-v2/service/appconfig
: v1.35.0- Feature: This release improves deployment safety by granting customers the ability to REVERT completed deployments, to the last known good state.In the StopDeployment API revert case the status of a COMPLETE deployment will be REVERTED. AppConfig only allows a revert within 72 hours of deployment completion.
github.com/aws/aws-sdk-go-v2/service/ec2
: v1.186.0- Feature: This release includes a new API to describe some details of the Amazon Machine Images (AMIs) that were used to launch EC2 instances, even if those AMIs are no longer available for use.
github.com/aws/aws-sdk-go-v2/service/ecs
: v1.48.0- Feature: This release adds support for EBS volumes attached to Amazon ECS Windows tasks running on EC2 instances.
github.com/aws/aws-sdk-go-v2/service/pcs
: v1.2.3- Documentation: Documentation update: added the default value of the Slurm configuration parameter scaleDownIdleTimeInSeconds to its description.
github.com/aws/aws-sdk-go-v2/service/qbusiness
: v1.15.0- Feature: Add a new field in chat response. This field can be used to support nested schemas in array fields
Release (2024-10-23)
Module Highlights
github.com/aws/aws-sdk-go-v2/service/bedrock
: v1.21.1- Documentation: Doc updates for supporting converse
github.com/aws/aws-sdk-go-v2/service/connect
: v1.114.0- Feature: Amazon Connect Service Feature: Add support to start screen sharing for a web calling contact.
github.com/aws/aws-sdk-go-v2/service/ec2
: v1.185.0- Feature: Amazon EC2 X8g, C8g and M8g instances are powered by AWS Graviton4 processors. X8g provide the lowest cost per GiB of memory among Graviton4 instances. C8g provide the best price performance for compute-intensive workloads. M8g provide the best price performance in for general purpose workloads.
github.com/aws/aws-sdk-go-v2/service/mwaa
: v1.32.0- Feature: Introducing InvokeRestApi which allows users to invoke the Apache Airflow REST API on the webserver with the specified inputs.
github.com/aws/aws-sdk-go-v2/service/paymentcryptography
: v1.15.0- Feature: Add support for ECC P-256 and P-384 Keys.
github.com/aws/aws-sdk-go-v2/service/paymentcryptographydata
: v1.16.0- Feature: Add ECDH support on PIN operations.
Release (2024-10-22)
Module Highlights
github.com/aws/aws-sdk-go-v2/service/imagebuilder
: v1.38.0- Feature: Add macOS platform and instance placement options
github.com/aws/aws-sdk-go-v2/service/m2
: v1.18.0- Feature: Add AuthSecretsManagerArn optional parameter to batch job APIs, expand batch parameter limits, and introduce clientToken constraints.
github.com/aws/aws-sdk-go-v2/service/rds
: v1.88.0- Feature: Global clusters now expose the Endpoint attribute as one of its fields. It is a Read/Write endpoint for the global cluster which resolves to the Global Cluster writer instance.
github.com/aws/aws-sdk-go-v2/service/repostspace
: v1.8.0- Feature: Adds the BatchAddRole and BatchRemoveRole APIs.
github.com/aws/aws-sdk-go-v2/service/timestreamquery
: v1.28.0- Feature: This release adds support for Query Insights, a feature that provides details of query execution, enabling users to identify areas for improvement to optimize their queries, resulting in improved query performance and lower query costs.