-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update docs; add more code to move-to-production
- Loading branch information
Showing
3 changed files
with
65 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| #!/bin/bash | ||
|
|
||
| # https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html | ||
|
|
||
| AWS=$(which aws 2>/dev/null) | ||
| if [ -z $AWS ] | ||
| then | ||
| echo "* aws CLI missing" | ||
| exit 1 | ||
| fi | ||
| $AWS sesv2 help >/dev/null 2>&1 | ||
| status=$? | ||
| if [ $status != 0 ] | ||
| then | ||
| echo "* aws sesv2 CLI missing" | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ -z $SES_USE_CASE_DESCRIPTION ] | ||
| then | ||
| SES_USE_CASE_DESCRIPTION="Used for alerting and notification from lambda and other applications to users within our own enterprise mail system" | ||
| fi | ||
|
|
||
| if [ -z $SES_ADDITIONAL_CONTACT_EMAIL ] | ||
| then | ||
| SES_ADDITIONAL_CONTACT_EMAIL="donald.e.badrak.ii@census.gov,roy.d.ashley.jr@census.gov" | ||
| fi | ||
|
|
||
| $AWS sesv2 put-account-details \ | ||
| --production-access-enabled \ | ||
| --mail-type TRANSACTIONAL \ | ||
| --use-case-description "$SES_USE_CASE_DESCRIPTION" \ | ||
| --additional-contact-email-addresses "$SES_ADDITINAL_CONTACT_EMAIL" \ | ||
| --contact-language EN | ||
| status=$? | ||
|
|
||
| if [ $status != 0 ] | ||
| then | ||
| echo "* error requesting production access for SES" | ||
| fi | ||
| exit $status | ||
|
|
||
| # unused options | ||
| # --website-url https://example.com | ||
| # | ||
| # env variables: | ||
| # AWS_DEFAULT_REGION | ||
| # AWS_PROFILE | ||
| # SES_ADDITIONAL_CONTACT_EMAIL | ||
| # SES_USE_CASE_DESCRIPTION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters