paws-r / paws Goto Github PK
View Code? Open in Web Editor NEWPaws, a package for Amazon Web Services in R
Home Page: https://www.paws-r-sdk.com
License: Other
Paws, a package for Amazon Web Services in R
Home Page: https://www.paws-r-sdk.com
License: Other
paws.s3_service.R looks like this:
cfg <- client_config(
service_name = "s3",
endpoints = list("us-gov-west-1" = "s3.{region}.amazonaws.com", "us-west-1" = "s3.{region}.amazonaws.com",
)
Notice the list isn't completed
From paws.ec2:
Issue
I'm trying to use paws package on an EC2 instance but it fails to get IAM credentials from the instance profile and i need to explicitly set the values for 'AWS_ACCESS_KEY_ID' and 'AWS_SECRET_ACCESS_KEY' in the environment. I get the following error when i try to get account summary on the instance or use any of the AWS services in the paws package with an IAM instance profile.
Below is the error message given for when i try to get account summary on an EC2 Instance
Error: Argument 'txt' must be a JSON string, URL or file.
Traceback:
- temp$get_account_summary()
- send_request(request)
- sign(request)
- run(request, sign)
- handler$fn(request)
- sign_sdk_request_with_curr_time(request)
- sign_with_body(v4, request$http_request, request$body, name,
. region, request$expire_time, request$expire_time > 0, signing_time)- get_credentials(signer$credentials)
- provider()
- get_iam_role()
- jsonlite::fromJSON(iam_role_response$body)
- stop("Argument 'txt' must be a JSON string, URL or file.")
- base::stop(..., call. = FALSE)
iam_role_response is NULL which is why the error is given. If i do a simple GET request on the instance to the metadata url "http://169.254.169.254/....", i can successfully retrieve the security credentials which is where PAWS seems to be failing.
Steps to reproduce
Using R version 3.5.1, with latest PAWS package running on EC2 Instance
Sys.setenv(
AWS_REGION = "eu-west-2"
)
iaminfo <- paws::iam()
iaminfo$get_account_summary()
HTML is not rendered inside code blocks, e.g. in iam_simulate_custom_policy
, we currently get:
#' The ARN for an account uses the following syntax:
#' `arn:aws:iam::<i>AWS-account-ID</i>:root`. For example, to represent the
Make sure generated packages list the right packages under Imports.
Check list for CRAN release:
a <- paws::ec2(config = list(region = "us-east-2"))
b <- paws::ec2(config = list(region = "us-east-1"))
# Returns the same list of key pairs.
a$describe_key_pairs()
b$describe_key_pairs()
Custom config code is on branch feature/custom_endpoint
.
e.g. Structure
should enforce names, List
enforce no names, etc.
In paws.elasticache
operation copy_snapshot
, "The S3 bucket %s does not exist." does not render correctly in the R help.
Found the following (possibly) invalid file URI:
URI: NextToken
From: man/connect_get_current_metric_data.Rd
"NextToken" is not a file nor an URL.
In several packages, we get warnings about the description, e.g.
build paws.mediaconnect
Warning message:
'Description' must contain one or more complete sentences
Travis for Linux, AppVeyor for Windows.
Implementation:
paws::ec2
.paws::ec2$run_instances
.<service>_<operation>
, e.g. ec2_run_instances
, to avoid name collisions between services.make paws
generates the single package.Benefits:
testthat
. Would also potentially be able to get code coverage for the generated code.Costs:
To-do:
make_sdk()
allowing one to specify which packages to build.get_structure
, read_api
, make_sdk
.make_sdk
bug s.t. if you put in a non-existent API, it doesn't fail, instead it builds the alphabetically first API.script/codecov.R
. See the Travis build log.Code coverage links to files don't work.
e.g. we should be able to set endpoints, etc. something like
config(
Endpoint = "https://example.com"
)
The following packages have integration test failures which also have XML error parse failures:
package | test |
---|---|
paws.cloudformation | describe_stack_events |
paws.cloudformation | describe_stack_resources |
paws.elasticache | describe_cache_security_groups |
paws.elasticache | list_allowed_node_type_modifications |
paws.elasticbeanstalk | describe_configuration_options |
paws.elasticbeanstalk | describe_environment_health |
paws.elasticbeanstalk | describe_environment_managed_action_history |
paws.elasticbeanstalk | describe_environment_managed_actions |
paws.elasticbeanstalk | describe_environment_resources |
paws.elasticbeanstalk | describe_instances_health |
paws.elasticbeanstalk | describe_platform_version |
paws.elbv2 | describe_listeners |
paws.elbv2 | describe_rules |
paws.importexport | list_jobs |
paws.redshift | describe_cluster_security_groups |
paws.redshift | describe_table_restore_status |
paws.simpledb | list_domains |
e.g. in paws.ec2::attach_volume
.
# This example attaches a volume (``vol-1234567890abcdef0``) to an
# instance (``i-01474ef662b89480``) as ``/dev/sdf``.
When making a request on an S3 bucket to an endpoint in the wrong region, you get a structured error response, of which Paws extracts and returns only the message. Full response below:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n
<Error>
<Code>PermanentRedirect</Code>
<Message>The bucket you are attempting to access must be addressed using the specified
endpoint. Please send all future requests to this endpoint.</Message>
<Endpoint>s3.amazonaws.com</Endpoint>
<Bucket>davidkretch</Bucket>
<RequestId>12ABA16DB44973A8</RequestId>
<HostId>i/luCtGDyDxKFG606J7t38Lc0r2aZUWnKCWgdPIZCNAzIYE6URwhaVh2j72ecaFNsCLUEWhV12M=</HostId>
</Error>
Code generation takes a long time -- possibly multiple hours. The biggest part of code generation is converting HTML to Markdown or plaintext with Pandoc.
Hi,
It seems that I can authenticate with normal AWS credentials but not with a temporary security credentials - is this correct and would it be possible to add support for this?
When running in the following code:
library(paws.batch)
(a <- describe_compute_environments(maxResults = 3))
I noticed that the parameters were not being used. The http request body is being created properly in the file handlers_jsonrpc.R.
However, the body is not being set at line 14 of that same file because request$client_info$target_prefix
is null.
e.g. a scalar parameter should not receive a vector of length greater than one.
The populateutil functions should also enforce rules about their contents, e.g. Structure
should require names, List
should require no names, etc.
run_instances
.operation(Param = list(Sub = "string"))
.query_unmarshal_error
does not work for S3 response errors, e.g.
(a <- put_bucket_tagging(
Bucket = "Name-of-My-Bucket",
Tagging = list(
TagSet = list(
list(
Key = "Dog",
Value = "Westie"
),
list(
Key = "Dog2",
Value = "Beagle"
)
)
)
))
IAM, CloudFront, etc. should sign requests from us-east-1 regardless which region the user chooses.
e.g. the attributes we add to help unmarshal API responses.
update_version.sh
is supposed to update a package's version when there are changes, but instead it will always update, if only due to differences between Unix and Windows line breaks.
cw <- paws::cloudwatch()
cw$list_metrics()
# Error in rawToChar(raw) :
# embedded nul in string: 'xœí\235_SÛº\022Àßϧèœw7þ—
# 8¹Ãe\006\002ía\006J\016\201öÌyady\235øàع–œ6ýô×Nà@!MBq¼+G/Ì`Œ%ÿ´»Z
# ...
The following packages receive default endpoints that do not exist.
paws.chime
paws.devicefarm
paws.globalaccelerator
paws.iot1clickdevicesservice
paws.kinesisanalyticsv2
paws.licensemanager
paws.mediastoredata
paws.migrationhub
paws.pinpointemail
Certain APIs require custom handlers. We should support adding them in from a file in make.paws/R/customizations
.
Hi all,
First off this is a great package and I really excited to started working with it. I am currently working on a wrapper of the python boto3 to create a R DBI interface into athena (https://github.com/DyfanJones/RAthena). I am really keen to do the same type of wrapper using the paws package as the driver package instead.
I just a quick questions first:
Many thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.