-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V4 Development Tracker #3362
Comments
Is there any way to test those packages? Some preview nuget source? |
We'll publish the preview packages to NuGet (e.g. |
First preview packages have been released. Blog post for the release https://aws.amazon.com/blogs/developer/preview-1-of-aws-sdk-for-net-v4/ |
Are you able to provide a preview version of Trying to enable native AoT for a project that depends on the SSM package gives a bunch of warnings:
It's possible some of the above are also coming from internal libraries for transient dependencies that haven't been compiled against v4 yet either. The app is still blocked from 0 AoT warnings due to a dependency on another third-party library that hasn't published some fixes I made yet, but otherwise this SSM package is the final hurdle. |
@martincostello I don't have a timeline yet but we would like push out preview versions of all of our high level packages like |
FYI this is the error I get from an .NET 8 app running as a Lambda with the latest version of
|
@martincostello A preview version of |
Thanks @normj. I've tested the latest version of the packages with three of our applications collectively using the v4 packages listed below, and I've not encountered any issues:
I've also tried native AoT publishing with two of the three, and there were also no trim warnings. |
Awesome @martincostello! Thanks for the feedback. |
Would it make sense to drop 'netcoreapp3.1' target framework as well in V4? It is not supported by Microsoft. Anyone who uses it for whatever reason - would still be able to use netstandard2.0 version. |
V4 Development Tracker
This issue is for tracking the changes being made for V4 of the AWS SDK for .NET. Development of V4 is happening in the
v4-development
branch in this repository. V4 is an evolutionary major version change with minimal breaking changes so application code using the AWS SDK can upgrade to V4 with low effort.Update August 15, 2024
First preview packages have been released. Blog post for the release https://aws.amazon.com/blogs/developer/preview-1-of-aws-sdk-for-net-v4/
Breaking changes
The list of breaking changes made in V4.
bool
are changed tobool?
.null
. The V3 behavior of initializing collections can be restored by setting theAmazon.AWSConfigs.InitializeCollections
totrue
. This property also exists in V3 for users that want to try this behavior change before upgrading to V4.us-east-1
will no longer be able to access buckets in other regions. Buckets musts be accessed with S3 service clients configured for the region the bucket is in. This change avoids surprises in applications using the S3 service client when under the covers it makes multiple AWS requests to access buckets that are not in service clients configuredus-east-1
region.Amazon.Auth.AccessControlPolicy.ActionIdentifiers
namespace. These identifiers were previously marked as obsolete due to be being out of date with no mechanism to keep them up to date. Code using theseActionIdentifiers
should be upgrade to use the string value of the IAM action name.AWSSDK.S3
package. This client had been marked as obsolete with the encryption client moved to its separate packageAmazon.Extensions.S3.Encryption
package. The following migration guide to transition to the separate package. https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/s3-encryption-migration.htmlDetermineServiceURL
method on theClientConfig
, the base class of service client configs likeAmazonS3Config
, was removed. This had been marked obsolete and was tied to an internal endpoint resolution system that was removed in V4. Application code calling this method should switch to using theDetermineServiceOperationEndpoint
method on the service client.us-east-1
regardless of the configured region when running in the public partition. As part of this change theStsRegionalEndpointsValue
enum was removed. Any code using that enum should be removed.RetryMode
defaults toStandard
instead ofLegacy
. TheLegacy
enum value was removed.DefaultConfigurationMode
defaults toStandard
instead ofLegacy
. TheLegacy
enum value was removed.DefaultClientConfig
inAWSSDK.Extensions.NETCore.Setup
no longer extends from service client config base classClientConfig
. The service client config properties have been replicated onDefaultClientConfig
using nullable value types to allow detecting when a value has been set onDefaultClientConfig
when copying the values to the service client config being created for the service client.CookieSigner
andUrlSigner
have been moved to a separate extension package calledAWSSDK.Extensions.CloudFront.Signers
to support SSL3 and take a dependency onBouncyCastle.Cryptography
.GetDecryptedPassword
has been moved to a separate package calledAWSSDK.Extensions.EC2.DecryptPassword
to support OpenSSL 3 and take a dependency onBouncyCastle.Cryptography
.Tagging-Directive
has been exposed as a public property onCopyObjectRequest
and is no longer automatically set to COPY. If a user doesn't specify a tagging directive the S3 backend automatically assumes it is COPY but if a user explicitly sets it to null, then we won't set the value at all.AmazonS3Config
'sUseArnRegion
will take the value set in the environment variable over that set in the~/.aws/config
file. This follows other config environment variable + config file precedence.DisableTrimmingLeadingSlash
has been removed.Other noteworthy changes
Removed Code
ECSTaskCredentials
class is removed. Please use theGenericContainerCredentials
provider which also supports EKS Pod Identities.StoredProfileAWSCredentials
andStoredProfileCredentials
is removed. Please use theNetSDKCredentialsFile
or theSharedCredentialsFile
.HasCachedAccessTokenAvailable
method on the SSOAWSCredentials class is removed.EnvironmentAWSCredentials
is removed. Please useAppConfigAWSCredentials
instead.StoredProfileFederatedCredentials
is removed. Please useFederatedAWSCredentials
instead.StoredProfileSAMLCredentials
class in SecurityTokenService is removed. Please useFederatedAWSCredentials
instead.EndpointDiscoveryEnabled
class is removed. Please use theEnvironmentVariableAWSConfiguration
instead.UseSigV4
property on theAmazonWebServiceRequest
class is removed.SignatureVersion
will be used directly instead.TryGetSection
methods inProfileIniFile
that don't take in nested properties is removed. Please use theTryGetSection
method inProfileIniFile
that accounts for nested properties.Parameters
dictionary inWebServiceRequestEventArgs
is obsolete.ParameteCollection
will be used instead.DoesS3BucketExistAsync
(string bucketName) in ICoreAmazonS3 is removed because it always uses HTTP. Please useAmazon.S3.Util.AmazonS3Util.DoesS3BucketExistV2Async
instead.AWSSDKUtils
are removedResolveResourcePath
,ProtectEncodedSlashUrlEncode
,ConvertToUnixEpochMilliSeconds
EC2_METADATA_SVC
,EC2_METADATA_ROOT
,EC2_USERDATA_ROOT
,EC2_DYNAMICDATA_ROOT
,EC2_APITOKEN_URL
inEC2InstanceMetadata
are removed. The fields were marked as obsolete in v3.ProfileManager
class in Amazon.Util is removed. Please use the SharedCredentialsFile or the NetSDKCredentialsFile instead.AWSConfigs
are removed:Logging
,ResponseLogging
, andLogMetrics
. UseLoggingConfig
instead.public static Condition NewCondition(DateComparisonType type, DateTime date)
inAmazon.Auth/AccessControlPolicy/ConditionFactory
is removed. Please useNewConditionUtc
instead.ClientConfig
class, the obsoleteDetermineDnsSuffix
has been removed. Use the service specificclient.DetermineServiceOperationEndpoint
method instead. TheReadEntireResponse
property has been removed, use theAWSConfigs.LoggingConfig.LogResponses
orClientConfig.LogResponse
instead.DynamoDB Changes
In V4 we're addressing issues around testability, improving configuring the high-level
Table
andDynamoDBContext
clients, and potentially additional fixes that require breaking changes.Table
with a mockedIAmazonDynamoDB
now returns anInvalidOperationException
instead of aNullReferenceException
. AsyncTable
methods should now work with a mocked client but you may still see exceptions when calling sync methods from .NET/Core/Standard. See PR #3388, this mostly addresses DynamoDBTable
misrepresents dependency onIAmazonDynamoDB
#1589.DynamoDBOperationConfig
into new operation-specific objects (SaveConfig
,LoadConfig
,QueryConfig
, etc.). The shared config has grown overtime, and contains properties that don't apply to every operation which can lead to confusion. we've marked the methods that takeDynamoDBOperationConfig
as obsolete. We won't remove them from V4 yet, though may do so in a future version. See PR #3421MetadataCachingMode
andDisableFetchingTableMetadata
fromDynamoDBOperationConfig
, and did not include these on the new operation-specific configs that were introduced above. These are table-level settings that should be specified on the globalAWSConfigsDynamoDB.Context
or onDynamoDBContextConfig
. See PR #3422DynamoDBOperationConfig
no longer inherits fromDynamoDBContextConfig
. This prevents you from passing aDynamoDBOperationConfig
in to the constructor forDynamoDBContext
, where some properties on the operation-specific config (such asOverrideTableName
) do not apply. See PR #3422IDynamoDBContext
have been updated to return the new interfaces.IBatchGet
andIMultiTableBatchGet
interfaces.IBatchWrite
andIMultiTableBatchWrite
interfaces.ITransactGet
andIMultiTableTransactGet
interfaces.ITransactWrite
andIMultiTableTransactWrite
interfaces.IAsyncSearch
interface.ITable
interface.ISearch
interface.IDocumentTransactWrite
andIMultiTableDocumentTransactWrite
interfaces.IDocumentTransactGet
andIMultiTableDocumentTransactGet
interfaces.IDocumentBatchWrite
andIMultiTableDocumentBatchWrite
interfaces.IDocumentBatchGet
andIMultiTableDocumentBatchGet
interfaces.FromJson
andToJson
methods on theDocument
object now use System.Text.Json instead of LitJson for serialization. A benefit of using System.Text.Json is this parser supports using the .NET Decimal type supporting higher precision for numeric floating point properties.The following changes were made in the SDK. They do not require changes to applications code using the SDK.
AssemblyVersion
will match theAssemblyFileVersion
. In .NET Framework 4.7.2 targetAssemblyVersion
will continue to use the V3 pattern of locking the version to the first 2 parts of the theAssemblyFileVersion
. This is done because .NET Framework treats theAssemblyVersion
as part of the identity assembly. This causes assembly collisions and forced recompilation when mixing versions of the SDK.endpoints.json
file in AWSSDK.Core was removed. This was a 1 MB json file that was parsed at startup for the SDK to determine the service endpoint for a region. Endpoint resolution has been replaced with a new system that generates rules into each individual service assembly for determining the service endpoints.AWSSDK.ToHex
performance. Thanks Steven WeerdenburgAWSSDK.CopyTo
performance. Thanks Daniel MarbachAWSSDKUtils.ParameterAsString
performance. Thanks Daniel MarbachAWSSDKUtils.DetermineService
performance. Thanks Daniel MarbachAWSSDKUtils.UrlEncode
performance. Thanks Daniel MarbachThanks Paulo Morgado
The text was updated successfully, but these errors were encountered: