Using DynamoDB, SQS and some other services within VPC-enabled Lambda functions
VPC-enabled Lambda functions
If you're running a Lambda function within a VPC (for instance, to allow it to connect to an RDS database), you will not normally be able to connect to non-VPC services like DynamoDB or SQS.
The only way to do so is to add a VPC endpoint in the VPC console, using the instructions here: https://aws.amazon.com/blogs/aws/new-vpc-endpoints-for-dynamodb/
WARNING: VPC endpoints are charged (around $8 per month per endpoint).