简体   繁体   English

AWS PHP sdk - 选定的服务

[英]AWS PHP sdk — selected services

I would like to use some parts of the AWS PHP SDK ( https://github.com/aws/aws-sdk-php ). 我想使用AWS PHP SDK的某些部分( https://github.com/aws/aws-sdk-php )。 However, the whole set is pretty heavy-- lots of files and functionality I don't need. 但是,整个设置非常繁重 - 我不需要很多文件和功能。 I really only need to work with S3 objects, I don't need the EC2, DynamoDB etc. stuff. 我真的只需要使用S3对象,我不需要EC2,DynamoDB等东西。

Is it possible to selectively build this SDK to eliminate the unnecessary stuff? 是否有可能选择性地构建此SDK以消除不必要的东西? Or can I simply remove the elements I don't need? 或者我可以简单地删除我不需要的元素?

Thanks for any ideas. 谢谢你的任何想法。

While I agree with Ryan, here is some other information that might be helpful to your specific use case. 虽然我同意Ryan,但这里有一些其他信息可能对您的特定用例有所帮助。

The SDK is now additionally shipped as a zip archive (starting with version 2.3.2), which also includes its third-party dependencies in a PSR-0 compatible directory structure. SDK现在另外作为zip存档 (从版本2.3.2开始)提供,其中还包括PSR-0兼容目录结构中的第三方依赖项。 You could technically just pull out what you need from there. 从技术上讲,你可以从那里拿出你需要的东西。

If you just want S3, you only need the Aws\\Common and Aws\\S3 namespaces from the SDK source. 如果您只想要S3,则只需要SDK源中的Aws\\CommonAws\\S3命名空间。 However, you'll also need all of Guzzle and the Symfony Event Dispatcher. 但是,您还需要Guzzle和Symfony事件调度程序。 You could safely remove the Doctrine, Monolog, and Psr components though since they are optional. 您可以安全地删除Doctrine,Monolog和Psr组件,因为它们是可选的。

Well, an SDK is precisely that… a Software Development Kit . 好吧,SDK就是......一个软件开发工具包

I suppose the first logical question is: why? 我想第一个合乎逻辑的问题是:为什么?

Now that many (most?) projects are using tools like Composer to manage project dependencies, how much does it really matter? 现在很多(大多数?)项目都在使用像Composer这样的工具来管理项目依赖项,它真的有多重要?

That said, no, there's not an easy way to do it. 那就是说,不,没有一个简单的方法可以做到这一点。 You can theoretically delete some stuff, but if something goes wrong, you'll need to reproduce the issue with the full SDK. 理论上你可以删除一些东西,但如果出现问题,你需要用完整的SDK重现问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM