Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dependency of SSM to cognito url trigger (#1395)
### Feature or Bugfix - Bugfix ### Detail When deploying an internet facing deployment for the first time, It fails to deploy in the frontend stage -in the cognito url custom resource trigger: ``` [ERROR] ParameterNotFound: An error occurred (ParameterNotFound) when calling the GetParameter operation: Traceback (most recent call last): File "/var/task/cognito_urls.py", line 77, in handler setup_cognito( File "/var/task/cognito_urls.py", line 27, in setup_cognito user_guide_link = ssm.get_parameter( File "/var/runtime/botocore/client.py", line 553, in _api_call return self._make_api_call(operation_name, kwargs) File "/var/runtime/botocore/client.py", line 1009, in _make_api_call raise error_class(parsed_response, operation_name) ``` The issue is that the SSM parameters that is trying to access do not exist yet in the first deployment because they are deployed as part of the frontend stack. In this PR we add a dependency of the SSM parameters needed to run the trigger ### Relates - #1366 ### Security Please answer the questions below briefly where applicable, or write `N/A`. Based on [OWASP 10](https://owasp.org/Top10/en/). - Does this PR introduce or modify any input fields or queries - this includes fetching data from storage outside the application (e.g. a database, an S3 bucket)? - Is the input sanitized? - What precautions are you taking before deserializing the data you consume? - Is injection prevented by parametrizing queries? - Have you ensured no `eval` or similar functions are used? - Does this PR introduce any functionality or component that requires authorization? - How have you ensured it respects the existing AuthN/AuthZ mechanisms? - Are you logging failed auth attempts? - Are you using or adding any cryptographic features? - Do you use a standard proven implementations? - Are the used keys controlled by the customer? Where are they stored? - Are you introducing any new policies/roles/users? - Have you used the least-privilege principle? How? By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information