最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Issues with Automate Snowflake integration with amazon s3 - Stack Overflow

programmeradmin5浏览0评论

I am following this blog available in AWS market place to automate the integration.

Initially I got an error message that Python 3.7 runtime is not supported. I updated the runtime to Python 3.8 in aws-snowflake-integrationobject.yml.

Now I am getting

Runtime.ImportModuleError: Unable to import module 'index': No module named 'requests' Traceback (most recent call last):

when I try to execute the stack. Its failing in the "SnowflakeResources" step.

When I go through the snowflakelayers.zip I am able to find the request folder inside that. Whether I have to create new zip file for the version change. I am newbie. I am just following the steps with the help of Google search.

I am following this blog available in AWS market place to automate the integration.

Initially I got an error message that Python 3.7 runtime is not supported. I updated the runtime to Python 3.8 in aws-snowflake-integrationobject.yml.

Now I am getting

Runtime.ImportModuleError: Unable to import module 'index': No module named 'requests' Traceback (most recent call last):

when I try to execute the stack. Its failing in the "SnowflakeResources" step.

When I go through the snowflakelayers.zip I am able to find the request folder inside that. Whether I have to create new zip file for the version change. I am newbie. I am just following the steps with the help of Google search.

Share Improve this question edited Mar 25 at 15:39 James Z 12.3k10 gold badges27 silver badges47 bronze badges asked Mar 25 at 4:59 SubramanianSubramanian 1011 silver badge12 bronze badges 2
  • snowflakewiki.medium/… - This link has the manual steps to achieve this integration. Sharing this to help anyone who faces the same issue. – Subramanian Commented Mar 26 at 4:45
  • Try this layer: arn:aws:lambda:us-east-1:770693421928:layer:Klayers-p38-requests:18 ready option found here... github/keithrozario/Klayers – shantanuo Commented Mar 28 at 8:20
Add a comment  | 

1 Answer 1

Reset to default 1

As you have indicated, the blog, and hence the layer, was written with Python 3.7 runtime.

The directory structure of a Lambda layer for Python runtime contains the runtime version:

python/lib/python3.x/site-packages

You can verify this in the snowflakelayer.zip as well that the directory is python3.7. This is why it failed to find the module.

So, you are right in that you have to recreate the layer for newer Python runtimes, if you want to follow this blog.

Alternatively, follow Snowflake documentation for configuring integrations and automate it using your own IaC solution. It's quite straightforward. I do think the blog's method of using a Lambda function, which as you have experienced first-hand involves maintaining its code, runtime, and dependencies, is a bit of an overkill for setting this up.

发布评论

评论列表(0)

  1. 暂无评论