Partial conversion to AWS SDK v2 structure

Use of .With is obsolete.