Welcome to your CDK TypeScript project
This is a blank project for CDK development with TypeScript.
The cdk.json
file tells the CDK Toolkit how to execute your app.
Useful commands
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template
Setup AWS Credentials
export AWS_ACCESS_KEY_ID=CHANGEME export AWS_SECRET_ACCESS_KEY=CHANGEME export AWS_DEFAULT_REGION=us-east-1
Get JWT Token
aws cognito-idp initiate-auth
--client-id 6frp5idm5phethtfjptip13r56
--auth-flow USER_PASSWORD_AUTH
--auth-parameters USERNAME=brian,PASSWORD=brian.123456
--query 'AuthenticationResult.IdToken'
--output text
Test API Authorization (use JWT_TOKEN generatedd from above step)
curl -H "Authorization: Bearer JWT_TOKEN" https://j07xt494i3.execute-api.us-east-1.amazonaws.com/prod/endpoint-one