-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker container fails to start with Python errors #78
Comments
Dug around in the code and looks like the README info for Postgres should be updated to show instead of
|
Separate issue, or question rather, but I wont open a new one right now.. I used the dummy values for the ARNs and AWS-SDK is yelling at me that it doesn't belong to my AWS user. Do I need a real active cluster? I'm still in early development and have not spun one up yet. Can I use this fully locally? |
@ablankenship10
Thank you for your report
Yes, I believe to able use this app on a local-machine. I have tested your setting with this command in my local. The result is good. $ aws --endpoint-url http://127.0.0.1:8080 rds-data execute-statement --resource-arn "arn:aws:rds:us-east-1:123456789012:cluster:dummy" --sql "SELECT datname FROM pg_database" --secret-arn "arn:aws:secretsmanager:us-east-1:123456789012:secret:dummy" --database dev
{
"numberOfRecordsUpdated": 0,
"records": [
[
{
"stringValue": "postgres"
}
],
[
{
"stringValue": "dev"
}
],
[
{
"stringValue": "template1"
}
],
[
{
"stringValue": "template0"
Also, I ran the same api in python. It works fine. I guess your AWS-SDK may validate dummy ARN. |
Thanks for your reply, I'm using Node.js (https://www.npmjs.com/package/aws-sdk) I've run into such issues before with other packages using aws-sdk. If I remember right there is a way to avoid this, let me try and see if i can make it work correctly. |
In python, I use dummy Credentials. import boto3; client = boto3.client('rds-data', endpoint_url='http://127.0.0.1:8080', aws_access_key_id='aaa', aws_secret_access_key='bbb') Also, some users use this app for Node.js You may need to cheat Credentials:thinking: |
Ah hah! Your example above lead me to setting an Endpoint URL in the typeORM ConnectionOptions serviceConfigOptions fields that are passed to the AWS-SDK like so:
Thanks a ton! (And thanks for responding to my email as well!) |
I'm happy 😄 I will improve the documents. Thank you very much. |
I have checked your docker-compose.yml again.
version: '3.1'
services:
local-data-api:
image: koxudaxi/local-data-api
restart: always
environment:
ENGINE: PostgresSQLJDBC I recommend choice |
Ah that seems to work too, so both PostgreSQLJDBC and PostgreSQL are supported but JDBC is better? |
Yes, JDBC is better:) Also, I guess AWS Aurora uses a JDBC driver |
Perfect, il use that then :) Another question as you may know more about the internals of whats going on with the AWS SDK, whats going on with the executeStatement vs executeSql calls? It seems like the latter is deprecated and the former is what other libraries are using to make calls. Any idea if you can just pass a straight string with values into the executeStatement method rather than breaking the values off into the |
Yes, AWS team is developing DataAPI actively. But, The api usually treat parameters as specified What type did you give a parameter to local-data-api? |
Thanks for the link. I'm Using TypeORM (nodejs/typescript) and failing to use an array(string) field. Its supported by Postgres with SQL so unsure why they made a weird API instead of just letting you pass a normal SQL string directly. From what I can tell it is supposed to be supported now via the data api using arrayValues but for some reason the packages im using (data-api-client via TypeORM) are not supporting it yet and that even when they tried it returns Not Supported Error. |
Describe the bug
Docker Compose fails to start service and constantly restarts
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The service starts successfully and accepts connections
docker-compose.yml
Error Messages
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: