You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--payload '{"sqlQuery": "select Author from books", "secretName":"/rdsinitexample/rds/creds/mysql-01"}' output;\
54
52
else\
55
53
echo"Using AWS CLI version 1 command format...";\
56
-
awslocal lambda invoke \
54
+
lstk aws lambda invoke \
57
55
--function-name my-lambda-rds-query-helper \
58
56
--payload '{"sqlQuery": "select Author from books", "secretName":"/rdsinitexample/rds/creds/mysql-01"}' output;\
59
57
fi
60
58
@echo "Query execution completed. Results:"
61
59
@cat output
62
60
63
-
start: ## Start LocalStack in detached mode
61
+
start: ## Start LocalStack (blocks until ready)
64
62
@echo "Starting LocalStack..."
65
63
@test -n "${LOCALSTACK_AUTH_TOKEN}"|| (echo "LOCALSTACK_AUTH_TOKEN is not set. Find your token at https://app.localstack.cloud/workspace/auth-token";exit 1)
Copy file name to clipboardExpand all lines: README.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,9 +27,9 @@ The following diagram shows the architecture that this sample application builds
27
27
## Prerequisites
28
28
29
29
- A valid [LocalStack for AWS license](https://localstack.cloud/pricing). Your license provides a [`LOCALSTACK_AUTH_TOKEN`](https://docs.localstack.cloud/getting-started/auth-token/) to activate LocalStack.
-[AWS CLI](https://docs.localstack.cloud/user-guide/integrations/aws-cli/) with the [`awslocal` wrapper](https://docs.localstack.cloud/user-guide/integrations/aws-cli/#localstack-aws-cli-awslocal).
32
-
-[CDK](https://docs.localstack.cloud/user-guide/integrations/aws-cdk/) with the [`cdklocal`](https://www.npmjs.com/package/aws-cdk-local) wrapper.
-[AWS CLI](https://docs.localstack.cloud/user-guide/integrations/aws-cli/) with the [`lstk aws` proxy](https://docs.localstack.cloud/aws/tooling/lstk/).
32
+
-[CDK](https://docs.localstack.cloud/user-guide/integrations/aws-cdk/) with the [`lstk cdk` proxy](https://docs.localstack.cloud/aws/tooling/lstk/).
33
33
-[Node.js](https://nodejs.org/en/download/)
34
34
-[`make`](https://www.gnu.org/software/make/) (**optional**, but recommended for running the sample application)
35
35
@@ -60,8 +60,7 @@ make install
60
60
Start LocalStack with the `LOCALSTACK_AUTH_TOKEN` pre-configured:
61
61
62
62
```shell
63
-
localstack auth set-token <your-auth-token>
64
-
localstack start
63
+
lstk start
65
64
```
66
65
> [!NOTE]
67
66
> By default, LocalStack uses the MariaDB engine (see [RDS documentation](https://docs.localstack.cloud/user-guide/aws/rds/#mysql-engine)).
@@ -104,15 +103,15 @@ This function requires two parameters:
104
103
To run a query using AWS CLI version 1, you can invoke the Lambda function with the following command:
105
104
106
105
```shell
107
-
awslocal lambda invoke \
106
+
lstk aws lambda invoke \
108
107
--function-name my-lambda-rds-query-helper \
109
108
--payload '{"sqlQuery": "select Author from books", "secretName":"/rdsinitexample/rds/creds/mysql-01"}' output
110
109
```
111
110
112
111
If you are using AWS CLI version 2, the command must include an additional flag for payload formatting:
113
112
114
113
```shell
115
-
awslocal lambda invoke \
114
+
lstk aws lambda invoke \
116
115
--cli-binary-format raw-in-base64-out \
117
116
--function-name my-lambda-rds-query-helper \
118
117
--payload '{"sqlQuery": "select Author from books", "secretName":"/rdsinitexample/rds/creds/mysql-01"}' output
0 commit comments