Comments (8)
It does seem to work with the Quiet parameter removed. Not sure how I failed to try that. Thank you. I will close the issue since it is resolved for me, though maybe a quick update to the docs would prevent others from running into the same issue. Also, s3fs looks promising!
from paws.
Happy to re-open this ticket.
from paws.
Ok I think I have fixed it:
remotes::install_github("dyfanjones/paws/paws.common", ref = "xml_build_flatten")
client <- paws.storage::s3()
bucket <- "mybucket"
key <- "removable.txt"
resp <- client$put_object(
Bucket = bucket,
Key = key,
Body = charToRaw("dummy")
)
client$delete_objects(
Bucket = bucket,
Delete = list(
Objects = list(
list(Key = key)
),
Quiet = T
)
)
#> $Deleted
#> list()
#>
#> $RequestCharged
#> character(0)
#>
#> $Errors
#> list()
Created on 2023-11-08 with reprex v2.0.2
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.3.2 (2023-10-31)
#> os macOS Sonoma 14.0
#> system aarch64, darwin20
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Europe/London
#> date 2023-11-08
#> pandoc 3.1.9 @ /opt/homebrew/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> base64enc 0.1-3 2015-07-28 [1] CRAN (R 4.3.0)
#> cli 3.6.1 2023-03-23 [1] CRAN (R 4.3.0)
#> crayon 1.5.2 2022-09-29 [1] CRAN (R 4.3.0)
#> curl 5.1.0 2023-10-02 [1] CRAN (R 4.3.1)
#> digest 0.6.33 2023-07-07 [1] CRAN (R 4.3.0)
#> evaluate 0.23 2023-11-01 [1] CRAN (R 4.3.1)
#> fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.0)
#> fs 1.6.3 2023-07-20 [1] CRAN (R 4.3.0)
#> glue 1.6.2 2022-02-24 [1] CRAN (R 4.3.0)
#> htmltools 0.5.7 2023-11-03 [1] CRAN (R 4.3.1)
#> httr 1.4.7 2023-08-15 [1] CRAN (R 4.3.0)
#> knitr 1.45 2023-10-30 [1] CRAN (R 4.3.1)
#> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.3.0)
#> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.3.0)
#> mime 0.12 2021-09-28 [1] CRAN (R 4.3.0)
#> paws.common 0.6.3.9000 2023-11-08 [1] Github (dyfanjones/paws@a7aaf4d)
#> paws.storage 0.5.0 2023-11-02 [1] local (/Users/dyfanjones/Documents/Packages/paws/cran/paws.storage)
#> purrr 1.0.2 2023-08-10 [1] CRAN (R 4.3.0)
#> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.3.0)
#> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.3.0)
#> R.oo 1.25.0 2022-06-12 [1] CRAN (R 4.3.0)
#> R.utils 2.12.2 2022-11-11 [1] CRAN (R 4.3.0)
#> R6 2.5.1 2021-08-19 [1] CRAN (R 4.3.0)
#> Rcpp 1.0.11 2023-07-06 [1] CRAN (R 4.3.0)
#> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.3.0)
#> rlang 1.1.1 2023-04-28 [1] CRAN (R 4.3.0)
#> rmarkdown 2.25 2023-09-18 [1] CRAN (R 4.3.1)
#> rstudioapi 0.15.0 2023-07-07 [1] CRAN (R 4.3.0)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0)
#> styler 1.10.2 2023-08-29 [1] CRAN (R 4.3.0)
#> vctrs 0.6.4 2023-10-12 [1] CRAN (R 4.3.1)
#> withr 2.5.2 2023-10-30 [1] CRAN (R 4.3.1)
#> xfun 0.41 2023-11-01 [1] CRAN (R 4.3.1)
#> xml2 1.3.5 2023-07-06 [1] CRAN (R 4.3.0)
#> yaml 2.3.7 2023-01-23 [1] CRAN (R 4.3.0)
#>
#> [1] /Users/dyfanjones/Library/R/arm64/4.3/library
#> [2] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
@wlandau @dleopold Please try it out and let me know :)
from paws.
paws.common 0.6.4 has been released to cran.
from paws.
Hi @dleopold sorry about that. Have you tried to delete objects without Quiet parameter?
svc$delete_objects(
Bucket = "...",
Delete = list(
Objects = list(
list(
Key = "..."
),
list(
Key = "..."
)
)
)
)
Here is an example of it working in the up and coming s3fs package https://github.com/DyfanJones/s3fs/blob/main/R/s3filesystem_class.R#L349-L362 .
Interesting I didn't realise this:
Also, FYI, I noticed that attempting to use either delete_object or delete_objects when the bucket is in a different region, the operation fails with an unhelpful error message:
Error in enc2utf8(data) : argument is not a character vector
I will have to have a look why this is the case 🤔
from paws.
I am hitting this issue too (working on ropensci/targets#1171) and it would be great to get Quiet = TRUE
to work. Quiet mode sends a smaller HTTP response, so it could perform faster.
from paws.
Thanks so much, @DyfanJones! Works for me now!
from paws.
Works here. Thanks.
from paws.
Related Issues (20)
- Missing components from response object for bedrock client HOT 1
- AWS config file doesn't support `endpoint_url` HOT 8
- Can't update lambda function with Ephemeral Stroage HOT 5
- Documentation page taking a long time to load HOT 11
- paws.common 0.7.2 cran release
- paws 0.6.0 cran release
- Update `paws_check_rhub` for rhubv2 HOT 1
- Fix paws.security.identity documentation
- s3$list_object_versions stopped working HOT 31
- Support EKS service accounts. HOT 2
- Potential issue with AWS default S3 region of us-east-1 HOT 11
- credential expiration comes back as numeric Inf (unclassed) HOT 5
- Getting 403 error when trying to access public S3 bucket HOT 3
- is it possible to list delete markers with s3$list_object_versions? HOT 17
- Refresh cached credentials
- paws.common release
- omics service error: could not resolve host HOT 22
- Invalid presigned S3 URL HOT 4
- A few issues with sts_assume_role_with_web_identity HOT 2
- cognitoidentityprovider initiate_auth with "USER_PASSWORD_AUTH" Errors when searching for additional credentials HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paws.