Skip to content

Releases: paws-r/paws

paws-v0.8.0

10 Feb 13:49
1f7e614
Compare
Choose a tag to compare

Paws 0.8.0 CRAN Release 🎊🥳🎉

Features

  • Streaming Support 🎊🥳🎉: Paws now returns PawsStreamHandler for streaming services. Learn more. This can be used in multiple ways:
    1. Passing a function to it similar to the apply functions.
    2. Returning the httr2::req_performance_connection and parsing with Paws built-in parser paws_stream_parser or using httr2::resp_stream_aws.

Example:

library(paws)

client <- bedrockruntime(region = "us-east-1")

model_id <- "amazon.titan-text-lite-v1:0"
conversation <- list(
  list(
    role = "user",
    content = list(list(text = "What's your name?"))
  )
)

resp <- client$converse_stream(
  modelId = model_id,
  messages = conversation
)

resp$stream(\(chunk) chunk$contentBlockDelta$delta$text)
# Note: stream will close connection after all chunks are read

resp <- client$converse_stream(
  modelId = model_id,
  messages = conversation
)

# Return httr2 req_performance_connection for full flexibility
con <- resp$stream(.connection = TRUE)

# Handle connection object using paws_stream_parser
while (!is.null(chunk <- paws_stream_parser(con))) {
  print(chunk$contentBlockDelta$delta$text)
}
# Note: paws_stream_parser will close connection after all chunks are read

# Or handle connection using httr2::resp_stream_aws
while (!is.null(chunk <- resp_stream_aws(con))) {
  str(chunk)
}
close(con)

Backend changes:

  • Paws has migrated from aws sdk js to aws sdk python botocore AWS JSONs, which has led to a change to the endpoint regex.

Services

New Support

  • bedrock-data-automation
  • bedrock-data-automation-runtime
  • codeconnections

Deprecated Services

  • nimblestudio: AWS no longer supports Nimble. Learn more
  • worklink: AWS no longer supports WorkLink.
  • cloudwatchevents: AWS CloudWatch Events have been move to EventBridge to align with AWS services.

paws.common-v0.8.0

07 Feb 13:37
Compare
Choose a tag to compare

Features:

  • migrate backend from httr to httr2
  • enrich sso message (#844). Thanks to @hadley for raising issue.
  • attempt to automatically set/refresh sso credentials by calling aws cli (#844)
  • moved api log level to debug and trace. This is to prevent info level being saturated by api calls.
  • new PawsStreamHandler, allows paws to handle aws stream event (#842). Thankyou to @hadley for developing the initial solution in httr2.

Bug Fix:

  • ensure url is set to lower case before signature

Potentially Breaking:

  • deprecated custom handler for s3_unmarshal_select_object_content in favour of new PawsStreamHandler

Performance:

  • migrate parse_url, parse_query_string and build_url to cpp for performance improvement.

Backend Vendor:

  • migrate vendor from aws-sdk-js to aws-sdk-python boto3 (endpoint regex updated accordingly).

paws.common-v0.7.7

04 Oct 09:05
45ece0e
Compare
Choose a tag to compare
  • fix unix time expiration check
  • remove redundant caching method
  • ensure all calls has paws user-agent string attached

paws-v0.7.0

18 Sep 16:25
45ece0e
Compare
Choose a tag to compare
  • Support hostPrefix when building aws api call. This fixes services like omics #804
  • Regenerated service api

paws.common-v0.7.6

04 Sep 13:07
Compare
Choose a tag to compare

Minor patch update, focusing on aws s3 copy functionality:

  • fix handle_copy_source_param encoding redirected calls.
  • fix handle_copy_source_param removing attributes

paws.common-v0.7.5

23 Aug 12:29
2e950ed
Compare
Choose a tag to compare
  • build endpoint with host_prefix (#804), thanks to @joseale2310 and @lyschoening for raising issue.
  • fix unix_time ensure seconds is numeric (#804), thanks to @joseale2310 and @lyschoening for raising issue.
  • fix stop anonymous credentials removing x-amz-* headers (#815) thanks to @cgostic for raising issue
  • fix s3 redirect for download_file
  • fix encode CopySource in operation CopyObject (#819)
  • enable lists to be passed to CopySource for CopyObject operations (#819). This is to align with boto3 implementation.
library(paws)
client <- s3()

bucket = "BUCKET"
key = "%01file%/output.txt"

resp <- client$put_object(
  Bucket = bucket,
  Key = key,
  Body = charToRaw("helloworld")
)

client$copy_object(
  Bucket = bucket,
  Key = "file_out_1.txt",
  CopySource = sprintf("/%s/%s", bucket, key)
)

client$copy_object(
  Bucket = bucket,
  Key = "file_out_2.txt",
  CopySource = list(
    Bucket = bucket,
    Key = key
  )
)
  • convert uuid to cpp for performance improvement.

paws.common-v0.7.4

08 Jul 15:43
cdd996d
Compare
Choose a tag to compare
  • fix transpose to correctly parse lists with empty first elements (#791), thanks to @FMKerckhof for raising issue.
  • support refreshable credentials for sso (#793)
  • fix region redirect for aws s3 buckets (#788) thanks to @payam-delfi for identifying issue
  • enrich error messages to align with boto3 error message template:
# previous error message format
svc <- paws.storage::s3()
response <- svc$get_object(
  Bucket = "<bucket>",
  Key = "<key>",
  IfNoneMatch = "<etag>"
)
#> Error: SerializationError (HTTP 304). failed to read from query HTTP response body
# new error message format
client <- paws.storage::s3()
resp <- client$get_object(
  Bucket = "<bucket>",
  Key = "<key>",
  IfNoneMatch = "<etag>"
)
#> Error: SerializationError (HTTP 304). An error occurred when calling the GetObject operation: Not Modified
  • use s3 head_bucket operation as final resort when redirecting aws s3 call.

paws-v0.6.0

17 May 09:24
6a2acb1
Compare
Choose a tag to compare

Update paws SDK to the latest services for each category, please check out https://www.paws-r-sdk.com/ for full documentation.

paws.common-v0.7.3

16 May 09:52
44a320c
Compare
Choose a tag to compare

Hot fix

  • fix xml_parse to correctly parse empty elements (#783) thanks to @stevepowell99 for raising issue

paws.common-v0.7.2

10 Apr 09:49
b08cc72
Compare
Choose a tag to compare

Performance: 🚀

  • improve performance of restxml_unmarshal up to ~ x3

New Feature: 💡

  • support global endpoint_url in config file and environmental variables (#764), thanks to @James-G-Hill for raising issue

Bug Fix: 🐞

  • fix rest_unmarshal_location_elements only skip header if location is not found (#761)
  • ensure custom endpoints aren't modified