Skip to content

Commit

Permalink
update script and configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPonchia committed Dec 20, 2024
1 parent c4834f5 commit 84dde4a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion packages/active-campaign-client/.env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
SENDER_URL=localhost:3000
SENDER_URL=http://localhost:3000/
AWS_REGION="region"
COGNITO_USER_POOL_ID="your_region"
DYNAMO_WEBINARS_TABLE_NAME="name"
AC_BASE_URL_PARAM='/ac/base_url'
AC_API_KEY_PARAM='/ac/api_key'
AC_RESYNC_TIMEOUT_IN_MS=1000

# Only needed run import script locally
AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export class ActiveCampaignClient {
): Promise<T> {
const [apiKey, baseUrl] = await Promise.all([
// Fallback env variable exists only for manual testing purposes
getParameter(this.apiKeyParam, this.ssm, process.env.AC_API_KEY),
getParameter(this.baseUrlParam, this.ssm, process.env.AC_BASE_URL),
getParameter(this.apiKeyParam, this.ssm, process.env.TEST_AC_API_KEY),
getParameter(this.baseUrlParam, this.ssm, process.env.TEST_AC_BASE_URL),
]);
return new Promise((resolve, reject) => {
// Parse the base URL to get hostname and path and remove any trailing slashes from the baseUrl
Expand Down
4 changes: 4 additions & 0 deletions packages/active-campaign-client/src/scripts/sync_all_users.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// To run this script you need to have proper environment variables set up.
// Must be logged in to AWS CLI and have the proper permissions to access the Cognito User Pool and DynamoDB tables.
// Then run 'npm run sync-all-users -w active-campaign-client'

/* eslint-disable */
import { ActiveCampaignClient } from "../clients/activeCampaignClient";
import { CognitoIdentityServiceProvider } from 'aws-sdk';
Expand Down

0 comments on commit 84dde4a

Please sign in to comment.