Comments (8)
Hi @rabalasubramani3 I am not familiar with local stack. Do you have an example for how another sdk works with it (if possible boto3)? I can then use that as a template to address the issue 😁
from paws.
It looks like you only need to change the endpoint (correct me if I am wrong). So it should work similar to how we can connect to minio s3.
from paws.
I will see if I can get it spun up on my local computer and update the ticket accordingly :)
from paws.
I tried various versions of these.. i.e tryied different endpoint
s3 <- paws::s3(
config = list(
credentials = list(
creds = list(
access_key_id = "foo",
secret_access_key = "bar"
)
),
endpoint='http://s3.localhost.localstack.cloud:4566',
region='us-east-1'
Here is my localstack docker-compose.yml
localstack:
image: localstack/localstack:2.0.0
container_name: sagpro_localstack
environment:
- AWS_DEFAULT_REGION=us-east-1
- DOCKER_HOST=unix:///var/run/docker.sock
- AWS_ACCESS_KEY_ID=foo
- AWS_SECRET_ACCESS_KEY=bar
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
volumes:
- sagpro_localstack_volume:/var/lib/localstack
- /var/run/docker.sock:/var/run/docker.sock
networks:
- sagpro-net
from paws.
Hi @rabalasubramani3 I am not familiar with local stack. Do you have an example for how another sdk works with it (if possible boto3)? I can then use that as a template to address the issue 😁
localstack allows you to mimic AWS setup locally.
boto3
AWS_LOCALSTACK_ENDPOINT_URL = 'http://localhost:4566'
AWS_ACCESS_KEY_ID ='foo'
AWS_SECRET_ACCESS_KEY = 'bar'
AWS_DEFAULT_REGION = 'us-east-1'
def get_local_storage_client():
client = boto3.client('s3',
endpoint_url=AWS_LOCALSTACK_ENDPOINT_URL,
aws_access_key_id=AWS_ACCESS_KEY_ID,
aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
region_name=AWS_DEFAULT_REGION,
config=Config(s3={'addressing_style': 'path'})
)
from paws.
Got it working now.
s3 <- paws::s3(
config = list(
credentials = list(
creds = list(
access_key_id = "foo",
secret_access_key = "bar"
)
),
endpoint='http://localstack:4566',
region='us-east-1'
)
)
within "localstack" R-studio and localstack all sitting in same network.
from paws.
For completeness you can set all your login details in the aws configs. So for example:
.aws/credentials
[localstack]
aws_access_key_id=youraccesskey
aws_secret_access_key=yoursecretkey
.aws/config
[profile localstack]
region=us-east-1
output=json
services = localstack
[services localstack]
s3 =
endpoint_url = http://localstack:4566/
library(paws)
client <- s3(config(credentials(profile ="localstack")))
from paws.
Closing this ticket
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.