English 中文(简体)
采用AWSQ号航道或按级功能分类的红色班轮
原标题:Execute SQL query on Redshift using AWS fargate orchestrated by Step Function

I could find many examples of invoking SQL script on Redshift using Lambda inside Step Function (ex: this works well), however I could not figured out how to execute SQL script using AWS Fargate in Step Functions. I could not figured out how to pass the Redshift credentials to execute the queries. In the lambda case it was easy as below. How to passing the credentials to Fargate Task probably is the same, however what are the commands to execute the SQL scripts?

"States": {
    "loadJob": {
      "Type": "Pass",
      "Next": "loadJobETL",
      "Result": {
        "input": {
          "redshift_cluster_id": "<RS_CLUSTER>",
          "redshift_database": "<MY_DB>",
          "redshift_user": "<MY_DB>root",
          "redshift_schema": "MY_SCHEMA",
          "action": "load_customer_address",
          "sql_statement": [
            "begin transaction;",
            "MY_SQL_STATEMENT",
            "end transaction;"
          ]
        }
      }
    },
    "loadJobETL": {
      "Type": "Task",
      "Resource": "arn:aws:lambda:us-east-1:XXXXXXXXXXX:function:SOME_FUNCTION",
      "TimeoutSeconds": 180,
      "HeartbeatSeconds": 60,
      "InputPath": "$",
      "ResultPath": "$",
      "Next": "checkStatus"
    }
}
问题回答




相关问题
Mount windows shared drive to MWAA in bootscript

In MWAA startup script sudo yum install samba-client cifs-utils -y sudo mount.cifs //dev/test/drop /mnt/dev/test-o username=testuser,password= pwd ,domain=XX Executing above commonds giving error - ...

How to get Amazon Seller Central orders programmatically?

We have been manually been keying Amazon orders into our system and would like to automate it. However, I can t seem to figure out how to go about it. Their documentation is barely there. There is: ...

Using a CDN like Amazon S3 to control access to media

I want to use Amazon S3/CloudFront to store flash files. These files must be private as they will be accessed by members. This will be done by storing each file with a link to Amazon using a mysql ...

unable to connect to database on AWS

actually I have my website build with Joomla hosted on hostmonster but all Joomla website need a database support to run this database is on AWS configuration files need to be updated for that I ...

Using EC2 Load Balancing with Existing Wordpress Blog

I currently have a virtual dedicated server through Media Temple that I use to run several high traffic Wordpress blogs. Both tend to receive sudden StumbleUpon traffic surges that (I m assuming) ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

热门标签