You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use multiple SDKs and they all work fine setting up a client with something like this:
EC2 Example:
28 │ let region_provider = RegionProviderChain::first_try(Region::new(region.to_owned()))
29 │ .or_default_provider()
30 │ .or_else(Region::new("us-west-2"));
31 │ let shared_config = aws_config::from_env().region(region_provider).load().await;
32 │ let client = Client::new(&shared_config);
For ECS I get failures and the documented way to setup a client for a region does not work.
error[E0277]: the trait bound `aws_sdk_ecs::config::Region: aws_config::meta::region::ProvideRegion` is not satisfied
--> src/cloud/amazon/container_service.rs:23:22
|
23 | .or_else(Region::new("us-west-2"));
| ------- ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `aws_config::meta::region::ProvideRegion` is not implemented for `aws_sdk_ecs::config::Region`
| |
| required by a bound introduced by this call
Expected Behavior
I expect for their to be a path where the proper traits are implemented to setup a region provider for ECS.
Current Behavior
Compilation fails.
Reproduction Steps
let region_provider = RegionProviderChain::default_provider();
let shared_config = aws_config::from_env().region(region_provider).load().await;
let client = Client::new(&shared_config);
this fail to compile due to invalid types. adding an actual region beyond the default will complain about undefined traits
Possible Solution
Adding a aws_sdk_ecs::Region to define traits on and a using the SdkConfig type defined in aws_config would probably solve the issues.
Additional Information/Context
I'm not sure why ECS deviates from EC2, NetworkManager, Config, and S3 SDKs so much, but that's the behavior I expect from setting up clients in any of the service SDKs at this point. It's quite possible I'm just doing things wrong.
This is a version consistency issue. The aws-config crate is set to 0.49, which depends on the 0.49 set of runtime support crates, but the aws-sdk-ecs crate is on 0.27, which depends on the 0.55.2 set of runtime crates. The Region type in 0.49 is not the same Region type as in 0.55.2 due to semver.
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
I use multiple SDKs and they all work fine setting up a client with something like this:
EC2 Example:
For ECS I get failures and the documented way to setup a client for a region does not work.
Expected Behavior
I expect for their to be a path where the proper traits are implemented to setup a region provider for ECS.
Current Behavior
Compilation fails.
Reproduction Steps
this fail to compile due to invalid types. adding an actual region beyond the default will complain about undefined traits
Possible Solution
Adding a
aws_sdk_ecs::Region
to define traits on and a using theSdkConfig
type defined inaws_config
would probably solve the issues.Additional Information/Context
I'm not sure why ECS deviates from EC2, NetworkManager, Config, and S3 SDKs so much, but that's the behavior I expect from setting up clients in any of the service SDKs at this point. It's quite possible I'm just doing things wrong.
Version
The text was updated successfully, but these errors were encountered: