aws-cloudformation / aws-cloudformation/cloudformation-cli

Document how to access Vpc resources

Open
#827 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
336
Forks
172
Avg merge
3d 5m
Merged PRs (30d)
3

Description

I'm working on a provider that will require access to resources within a VPC.

The current case is that I have an RDS database within a private VPC. I can create and register the resource provider and it _tries_ to execute the code correctly. Because the Lambda from the provider can not run in a specific VPC (or can it?) it fails miserably:

```
Exception caught could not connect to server: Connection timed out
Is the server running on host "rds-endpoint.example.com" (192.0.2.1) and accepting
TCP/IP connections on port 5432?
Traceback (most recent call last):
File "/var/task/cloudformation_cli_python_lib/resource.py", line 210, in __call__
raise error
File "/var/task/cloudformation_cli_python_lib/resource.py", line 203, in __call__
progress = self._invoke_handler(caller_sess, request, action, callback)
File "/var/task/cloudformation_cli_python_lib/resource.py", line 84, in _invoke_handler
progress = handler(session, request, callback_context)
File "/var/task/boehringer_rds_database/handlers.py", line 70, in create_handler
region=request.region,
File "/var/task/boehringer_rds_database/db.py", line 37, in create
host=endpointAddress, port=endpointPort, database="postgres", user=user, password=password, sslmode="require"
File "/var/task/psycopg2/__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection timed out
Is the server running on host "rds-endpoint.example.com" (192.0.2.1) and accepting
TCP/IP connections on port 5432?
```

Document a way how to create a resource provider that has access to VPC resources.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.