Skip to content

Instantly share code, notes, and snippets.

@reapz
Created July 25, 2019 23:03
Show Gist options
  • Select an option

  • Save reapz/44dfcecc80ee6292959ae298f2fafcfd to your computer and use it in GitHub Desktop.

Select an option

Save reapz/44dfcecc80ee6292959ae298f2fafcfd to your computer and use it in GitHub Desktop.
AWS CLI Commands

AppSync

Create AppSync Data Source to RDS Data API

aws appsync create-data-source --api-id ID --service-role-arn ARN --name datasourcetest --type RELATIONAL_DATABASE --relational-database-config file://config.json --profile PROFILE --region REGION

Example config.json

{
  "relationalDatabaseSourceType": "RDS_HTTP_ENDPOINT",
  "rdsHttpEndpointConfig": {
    "awsRegion": "awsRegion",
    "dbClusterIdentifier": "dbClusterIdentifier",
    "databaseName": "databaseName",
    "schema": "schema",
    "awsSecretStoreArn": "awsSecretStoreArn"
  }
}

Cognito

Create Cognito User With Attributes

aws cognito-idp admin-create-user --user-pool-id USER_POOL_ID --username USERNAME --temporary-password password --user-attributes Name=given_name,Value=Value Name=family_name,Value="With Spaces" --profile PROFILE --region REGION

Update Cognito User Attributes

aws cognito-idp admin-update-user-attributes --user-pool-id USER_POOL_ID --username USERNAME --user-attributes Name=given_name,Value=Value Name=family_name,Value="With Spaces" --profile PROFILE --region REGION

Add Cognito User to Group

aws cognito-idp admin-add-user-to-group --user-pool-id USER_POOL_ID --username USERNAME --group-name GROUP_NAME --profile PROFILE --region REGION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment