Skip to content

Instantly share code, notes, and snippets.

@hatertron3000
hatertron3000 / App.js
Created September 20, 2019 16:26
importing Amplify JS into App.js
import Amplify from 'aws-amplify'
import awsconfig from './aws-exports'
@hatertron3000
hatertron3000 / App.js
Created September 20, 2019 16:27
configure Amplify JS in App.js
Amplify.configure(awsconfig)
@hatertron3000
hatertron3000 / parameters.json
Created September 20, 2019 17:25
retrieveSecret Lambda parameters
{
"SECRETNAME": "<YOUR SECRET NAME IN SECRETS MANAGER>",
"SECRETKEY": "<YOUR SECRET KEY NAME FOR THE BC CLIENT SECRET VALUE>",
"SECRETARN": "<YOUR SECRET AMAZON RESOURCE NAME>"
}
@hatertron3000
hatertron3000 / retrieveSecret-cloudformation-template.json
Created September 20, 2019 18:29
Additions to the Parameters object in the CloudFormation template for the retrieveSecret Lambda
"SECRETNAME": {
"Type": "String",
"Default": ""
},
"SECRETKEY": {
"Type": "String",
"Default": ""
},
"SECRETARN": {
"Type": "String",
@hatertron3000
hatertron3000 / retrieveSecret-cloudformation-template.json
Created September 20, 2019 18:31
PolicyDocument addition for the CloudFormation template for the retrieveSecret Lambda
{
"Effect": "Allow",
"Action": "secretsmanager:GetSecretValue",
"Resource": {
"Ref": "SECRETARN"
}
}
@hatertron3000
hatertron3000 / retrieveSecret-cloudformation-template.json
Created September 20, 2019 18:34
Environment variables additions to the CloudFormation template for the retrieveSecret Lambda
"SECRETNAME": {
"Ref": "SECRETNAME"
},
"SECRETKEY": {
"Ref": "SECRETKEY"
}
@hatertron3000
hatertron3000 / CognitoStoresPreSignup_parameters.json
Created September 20, 2019 21:34
parameters.json for the CognitoStoresPreSignup Lambda
{
"REDIRECTURL": "<YOUR APP REDIRECT/INSTALL URL>",
"BCCLIENTID": "<YOUR BIGCOMMERCE CLIENT ID>",
"modules": "",
"resourceName": "CognitoStoresPreSignup"
}
@hatertron3000
hatertron3000 / CognitoStoresPreSignup-cloudformation-template.json
Created September 20, 2019 21:46
Additions for Parameters object in amplify/backend/function/CognitoStoresPreSignup/CognitoStoresPreSignup-cloudformation-template.json
"REDIRECTURL": {
"Type": "String",
"Default": ""
},
"BCCLIENTID": {
"Type": "String",
"Default": ""
}
@hatertron3000
hatertron3000 / CognitoStoresPreSignup-cloudformation-template.json
Created September 20, 2019 21:50
Environment Variables addition in the CloudFormation template for PresSignup Lambda
"CLIENT_ID": {
"Ref": "BCCLIENTID"
},
"REDIRECT_URL": {
"Ref": "REDIRECTURL"
}
@hatertron3000
hatertron3000 / .env
Created September 21, 2019 16:41
Require HTTPS for all routes in the React app
HTTPS=true