aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

Cannot reapply for SES prod access via the CLI after initial denial

Open pietrorea opened this issue 3 years ago • 7 comments

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug

I initially applied to get prod access (i.e. out of the sandbox) for Amazon SES via the AWS dashboard but got denied because I didn't provide enough detail. Online documentation said I would have to re-apply via the AWS CLI. This is the command I tried to do

aws sesv2 put-account-details \
--profile ${ADMIN_PROFILE} \
--production-access-enabled \
--mail-type TRANSACTIONAL \
--website-url ${MY_SITE} \
--use-case-description "...." \
--additional-contact-email-addresses ${EMAIL_ADDRESS}. \
--contact-language EN \

But it's giving me this error message:

An error occurred (ConflictException) when calling the PutAccountDetails operation: None

It didn't give me a lot more info when adding the -debug flag. Logs posted below.

SDK version number 2.4.10

Platform/OS/Hardware/Device What are you running the cli on?

macOS Monterrey on M1 laptop, Python/3.8.8 Darwin/21.2.0 exe/x86_64 prompt/of

To Reproduce (observed behavior) Steps to reproduce the behavior

  • Run the command shown above

Expected behavior A clear and concise description of what you expected to happen.

  • After running the command, I expect to be able to reapply for prod access programmatically.

Logs/output Get full traceback and error logs by adding --debug to the command.

This seems to be the important bit, but doesn't give much of a reason of why it failed.

': 'https://email.us-east-1.amazonaws.com/v2/email/account/details', 'context': {'client_region': 'us-east-1', 'client_config': <botocore.config.Config object at 0x7fe82963c790>, 'has_streaming_input': False, 'auth_type': None}}
2022-01-12 22:19:21,817 - MainThread - botocore.hooks - DEBUG - Event request-created.sesv2.PutAccountDetails: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7fe82963c880>>
2022-01-12 22:19:21,817 - MainThread - botocore.hooks - DEBUG - Event choose-signer.sesv2.PutAccountDetails: calling handler <function set_operation_specific_signer at 0x7fe8288a9af0>
2022-01-12 22:19:21,818 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2022-01-12 22:19:21,818 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/v2/email/account/details

content-type:application/json
host:email.us-east-1.amazonaws.com
x-amz-date:20220113T031921Z

content-type;host;x-amz-date
f0ad0c2ee8f3139b5f2fbf52802456e0213f0c7c94f56083b0266f74a1cf0094
2022-01-12 22:19:21,818 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20220113T031921Z
20220113/us-east-1/ses/aws4_request
2a0059f64ac792463be9a9cdfbf6d60c9b90954e8d2787e4ebebb29105d96a4c
2022-01-12 22:19:21,818 - MainThread - botocore.auth - DEBUG - Signature:
0c1cab687b59e3c77bf8182afe1bcab4ff03763142a6818b07cf56a4d04035f5
2022-01-12 22:19:21,818 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://email.us-east-1.amazonaws.com/v2/email/account/details, headers={'Content-Type': b'application/json', 'User-Agent': b'aws-cli/2.4.10 Python/3.8.8 Darwin/21.2.0 exe/x86_64 prompt/off command/sesv2.put-account-details', 'X-Amz-Date': b'20220113T031921Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIAUQOYYAVWDHCZ3U4O/20220113/us-east-1/ses/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=0c1cab687b59e3c77bf8182afe1bcab4ff03763142a6818b07cf56a4d04035f5', 'Content-Length': '692'}>
2022-01-12 22:19:21,819 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/local/aws-cli/awscli/botocore/cacert.pem
2022-01-12 22:19:21,819 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): email.us-east-1.amazonaws.com:443
2022-01-12 22:19:22,002 - MainThread - urllib3.connectionpool - DEBUG - https://email.us-east-1.amazonaws.com:443 "POST /v2/email/account/details HTTP/1.1" 409 16
2022-01-12 22:19:22,003 - MainThread - botocore.parsers - DEBUG - Response headers: {'Date': 'Thu, 13 Jan 2022 03:19:21 GMT', 'Content-Type': 'application/json', 'Content-Length': '16', 'Connection': 'keep-alive', 'x-amzn-RequestId': '29f067d8-3cdd-4e1d-b2f1-36d6100ca738', 'x-amzn-ErrorType': 'ConflictException'}
2022-01-12 22:19:22,003 - MainThread - botocore.parsers - DEBUG - Response body:
b'{"message":null}'
2022-01-12 22:19:22,006 - MainThread - botocore.parsers - DEBUG - Response headers: {'Date': 'Thu, 13 Jan 2022 03:19:21 GMT', 'Content-Type': 'application/json', 'Content-Length': '16', 'Connection': 'keep-alive', 'x-amzn-RequestId': '29f067d8-3cdd-4e1d-b2f1-36d6100ca738', 'x-amzn-ErrorType': 'ConflictException'}
2022-01-12 22:19:22,006 - MainThread - botocore.parsers - DEBUG - Response body:
b'{"message":null}'
2022-01-12 22:19:22,006 - MainThread - botocore.hooks - DEBUG - Event needs-retry.sesv2.PutAccountDetails: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x7fe8296822e0>>
2022-01-12 22:19:22,006 - MainThread - botocore.retries.standard - DEBUG - Not retrying request.
2022-01-12 22:19:22,006 - MainThread - botocore.hooks - DEBUG - Event after-call.sesv2.PutAccountDetails: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x7fe82963ce20>>
2022-01-12 22:19:22,007 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
  File "awscli/clidriver.py", line 459, in main
  File "awscli/clidriver.py", line 594, in __call__
  File "awscli/clidriver.py", line 770, in __call__
  File "awscli/clidriver.py", line 901, in invoke
  File "awscli/clidriver.py", line 913, in _make_client_call
  File "awscli/botocore/client.py", line 281, in _api_call
  File "awscli/botocore/client.py", line 609, in _make_api_call
botocore.errorfactory.ConflictException: An error occurred (ConflictException) when calling the PutAccountDetails operation: None

An error occurred (ConflictException) when calling the PutAccountDetails operation: None

Additional context Add any other context about the problem here.

N/A

pietrorea avatar Jan 13 '22 03:01 pietrorea

Hi @pietrorea,

Sorry to hear you're having an issue. This is a server side error, so not an issue with the AWS CLI. Can you highlight for me the page that states followup requests must be performed via the AWS CLI? I did not see that on this documentation page. I only see the following, which says you could do it via the CLI if you wanted to automate or for a large number of accounts:

Optionally, you can also submit your request for production access using the AWS CLI. Submitting your request using the AWS CLI is helpful when you want to request production access for a large number of identities, or when you want to automate the process of setting up Amazon SES.

Per the SES documentation, you should contact AWS Support through the AWS console to resolve this.

One improvement I can see is that the AWS SES documentation does not document this HTTP return code (409) in the common errors page. I will give that feedback to the SES team.

kdaily avatar Jan 13 '22 17:01 kdaily

@kdaily thank you for the update. What made me think I had to do it via the CLI was a big blue banner in the SES dashboard saying that I could not re-apply via the dashboard. I can't see it anymore because I eventually got approved via a support ticket.

Thanks for your help! All good on my end

pietrorea avatar Jan 14 '22 19:01 pietrorea

Thanks @pietrorea! I'll check on that, and see about adding this error code to the docs. Thanks for bringing it to our attention.

kdaily avatar Jan 14 '22 23:01 kdaily

I am facing the same issue. Can you guide me through what should I do ?

shyam-2002 avatar Feb 15 '22 11:02 shyam-2002

any news on this?

morandalex avatar Aug 09 '22 12:08 morandalex

An error occurred (ConflictException) when calling the PutAccountDetails operation: None

Guys , anyone got some take on it ? Do we have some limitation to the size of string we can send through (--use-case-description "") flag ?

ehtishammubarik avatar Aug 14 '22 22:08 ehtishammubarik

The reason for this is that your previous ticket is active in support case--- AWS SES has a policy for no-reply so we can't re-apply on console as well for same region....To resolve that ticket go to support and provide required info there if missing.

If you want to create new ses , use a different region.. ----

WORKED LIKE A CHARM-

ehtishammubarik avatar Aug 15 '22 09:08 ehtishammubarik

Thanks all for following up here. As previously mentioned this is a server-side error coming from the PutAccountDetails API, and the recommendation for service API issues is to reach out to AWS Support for assistance.

The 409 ConflictException error is documented in the PutAccountDetails documentation, but as previously mentioned we can recommend that the SES team adds this to the common errors page. I'm going to close this issue as it doesn't directly relate to the AWS CLI but please let us know if you had any additional questions or feedback.

tim-finnigan avatar Nov 11 '22 17:11 tim-finnigan

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Nov 11 '22 17:11 github-actions[bot]