AWS Troubleshooting
Tips and tricks for using AWS as to host the proxy.
Who are you?
If above doesn't happen seem to work as expected, some ideas in the next section may help.
Your AWS Organization uses SSO via Okta or some similar provider
Options:
execute terraform via AWS Cloud Shell
find credentials output by your SSO helper (eg,
aws-okta
) then fill the AWS CLI env variables yourself:
if your SSO helper fills default AWS credentials file but simply doesn't set the env vars, you may be able to export the profile to
AWS_PROFILE
, eg
References: https://discuss.hashicorp.com/t/using-credential-created-by-aws-sso-for-terraform/23075/7
Your AWS User has MFA
Options:
execute terraform via AWS Cloud Shell
use a script such as aws-mfa to get short-lived key+secret for your user.
Logs via Cloud Watch
via Web Console
Log into AWS web console
navigate to the AWS account that hosts your proxy instance (you may need to assume a role in that account)
then the region in that account in which your proxy instance is deployed. (default
us-east-1
)then search or navigate to the
AWS Lambda
s feature, and find the specific one you wish to debugfind the tabs for
Monitoring
then within that,Logging
, then click "go to Cloud Watch"
via CLI
Unless your AWS CLI is auth'd as a user who can review logs, first auth it for such a role.
You can do this with a new profile, or setting env variables as follows:
Then, you can do a series of commands as follows:
Errors in Terraform apply
error creating Lambda Function URL
Something like the following:
Your Terraform state is inconsistent. Run something like the following, adapted for your connector:
NOTE: you likely need to change outlook-mail
if your error is with a different data source. The \
chars are needed to escape the double-quotes/brackets in your bash command.
Permissions Errors
error reading SSM Parameters
Something like the following:
Check:
the SSM parameter exists in the AWS account
the SSM parameter can be read by the lambda's execution rule (eg, has an attached IAM policy that allows the SSM parameter to be read; can test this with the AWS Policy Simulator, setting 'Role' to your lambda's execution role, 'Service' to 'AWS Systems Manager', 'Action' to 'Get Parameter' and 'Resource' to the SSM parameter's ARN.
the SSM parameter can be decrypted by the lambda's execution role (if it's encrypted with a KMS key)
Setting IS_DEVELOPMENT_MODE
to "true" in the Lambda's Env Vars via the console can enable some additional logging with detailed SSM error messages that will be helpful; but note that some of these errors will be expected in certain configurations.
Our Terraform examples should provide both of the above for you, but worth double-checking.
If those are present, yet the error persists, it's possible that you have some org-level security constraint/policy preventing SSM parameters from being used / read. For example, you have a "default deny" policy set for SSM GET actions/etc. In such a case, you need to add the execute roles for each lambda as exceptions to such policies (find these under AWS --> IAM --> Roles).
Last updated