亚马逊云科技re_Invent 2023产品体验:亚马逊云科技产品应用实践 王炸产品Amazon Q,你的AI助手

本篇文章授权活动官方亚马逊云科技文章转发、改写权,包括不限于在 亚马逊云科技开发者社区, 知乎,自媒体平台,第三方开发者媒体等亚马逊云科技官方渠道

意料之中

2023年9月25日,亚马逊宣布与 Anthropic 正式展开战略合作,结合双方在更安全的生成式 AI 领域的先进技术和专业知识,加速 Anthropic 未来基础模型的开发,并将其广泛提供给亚马逊云科技的客户使用。
在2023年即将结束之际,亚马逊云科技在9月底宣布于Anthropic展开战略合作,此次合作是亚马逊云科技在生成式 AI “三层架构”中持续扩展其独特服务的最新发布。在底层,亚马逊云科技继续提供来自英伟达的计算实例,以及亚马逊云科技的自研芯片,包括用于 AI 训练的 Amazon Trainium 以及用于 AI 推理的 Amazon Inferentia 实例。
在中间层,亚马逊云科技专注于为客户提供来自多个领先模型供应商的最受欢迎的基础模型。此外,客户可以定制这些模型,确保自己数据的隐私和安全,同时还能与亚马逊云科技其他工作负载无缝集成,这一切都由亚马逊云科技的新服务 Amazon Bedrock 提供支持。即日起,客户将能够提前使用定制 Anthropic 模型的功能,利用自己的专有数据来创建自己的私有模型,并且可以通过 Amazon Bedrock 的自助服务使用微调功能。
在顶层,亚马逊云科技为客户提供了生成式 AI 应用程序和服务,比如功能强大的 AI 编程助手 Amazon CodeWhisperer,它可以直接在代码编辑器中生成代码编写建议,从而提高开发人员编写代码的效率。

至此,我们已经可以看到的是亚马逊云科技在AI方面的长远布局,也为后面的发展奠定了良好的基础。

Amazon Q

在Amazon CodeWhisperer推出之后,就对于Amazon CodeWhisperer的一些功能提出了期待,果然不出意料,在2023亚马逊云科技re:Invent大会推出在全新的AI生成式助手—Amazon Q
Amazon Q 可以帮助您使用公司信息存储库、代码和企业系统中的数据和专业知识,快速获得紧迫问题的相关答案、解决问题、生成内容并采取行动。 当您与 Amazon Q 聊天时,它会提供即时的相关信息和建议,以帮助简化任务、加快决策速度并帮助激发工作中的创造力和创新。

有问题必定有答案,**Amazon Q:**一款基于生成式人工智能(AI)的新型助手,专为辅助工作而设计,可以针对客户的业务量身定制,可为开发人员和 IT 专业人员提供支持,可在 AWS 的多个领域提供,无论您在哪里工作,都可以快速访问答案和创意
提供多种功能和使用场景

借助 Amazon Q,AI 专家将随时待命,回答问题、更快地编写代码、排查问题、优化工作负载,甚至可以帮助您编写新功能。这些功能简化了在 AWS 上构建应用程序的所有阶段的工作。
如果需要额外的帮助,Amazon Q 还支持您直接从 Q 界面与 AWS Support 座席进行互动,从而消除客户自助服务体验中的任何难题。与 AWS Support 的集成在控制台中提供,并提供 AWS Support 套餐中包含的权益。

视频演示

亚马逊云科技re:Invent 2023产品体验:亚马逊云科技产品应用实践 王炸产品Amazon Q,你的AI助手

实践复现

在官方博文中,有给出很多使用方法,比如对话式问答、故障排除、代码转换升级应用程序等等,都是极为实用的功能,那么就带着这些答案来复现官方的案例吧

对话式问答

想必大家都用过很多的生成式AI助手,例如OpenAI的ChatGPT、Google的Bard、阿里的通义千问、百度的文心一言等等,这种都是对话式的问答,那么大家有没有用过在一家云平台上面的AI助手?直接在控制台上,就立马可以和AI对话,那么亚马逊云科技的Amazon Q(预览版)是你绝对不能错过的一款AI助手,其具备亚马逊云科技专业知识,能够让你在迷茫的时候,得到快速、正确的帮助。
image.png

入门级问答:

基础知识简单问答:

Q:Hi,I want create a linux system instance to host my website,I should choose ec2 or lightsail?
A:Here are the key factors to consider when choosing between Amazon EC2 and Lightsail for hosting your website:

- Lightsail is easier to use and manage if you have a simpler workload like a basic website or app. It provides pre-configured options that can be set up with just a few clicks. 

- EC2 gives you more flexibility and control over your server configuration but requires more devops knowledge. You have to manage components like networking and security groups yourself.

- Lightsail instances have fixed configurations while EC2 allows you to choose the exact compute, memory, storage and networking capabilities you need.

- The Lightsail interface provides an all-in-one dashboard for managing your resources while EC2 requires using different AWS console pages for different tasks.

- Basic Lightsail plans have all the necessary components included in a monthly flat fee. With EC2 you pay separately for individual resources like instances, storage, networking etc.

For a simple website that doesn't have demanding technical requirements, Lightsail would be easier to get started with. But for more complex or resource-intensive workloads, EC2 gives you more power and customization options at the cost of requiring more devops expertise.
Sources
[1] [What are the differences between Amazon EC2 and Amazon Lightsail?] (https://repost.aws/knowledge-center/lightsail-differences-from-ec2)

image.png

专业知识问答

Q:If routes are advertised outside of AWS network, will this ASN be
pre-pend to the AS-path attribute of a route? If routes are advertised inside
AWS network, will this ASN be pre-pend to the AS-path attribute of a route?

A:
If routes are advertised outside of the AWS network, the ASN associated with the AWS Direct Connect connection or AWS Transit Gateway will not be prepended to the AS-path attribute of the route. This is because AWS does not actually handle routing or see the traffic in this case. 

If routes are advertised within the AWS network (e.g. between a VPC and a Direct Connect gateway or Transit Gateway), the ASN will not be prepended to the AS-path either. AWS uses other mechanisms like local preference to determine the best path within AWS without modifying the AS-path. 

The AS-path is generally not modified by AWS, but customers can influence route selection and traffic flow within AWS by configuring:

1. Local preference BGP communities 
2. Advertising routes with different AS-path lengths
3. Configuring the AS-path attribute for interfaces in the same region

For more details on routing and BGP configurations within AWS, please refer to the AWS documentation pages on Direct Connect, Transit Gateway and VPC routing. The documentation provides the most accurate and up-to-date information.
Sources
[1] [Using AS-Path attribute to influence routing over multiple regions] (https://repost.aws/questions/QUPLkeHS0oT5qkHJv0d_9owA/using-as-path-attribute-to-influence-routing-over-multiple-regions)
[2] [AWS Transit Gateway ASN visibility ] (https://repost.aws/questions/QUbFjl8tPNS7uwBFMtQGdJFw/aws-transit-gateway-asn-visibility)
[3] [How Amazon Route 53 uses EDNS0 to estimate the location of a user - Amazon Route 53] (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-edns0.html)

image.png

EC2实例选型优化

作者也体验了这个功能(注意要使用英文界面),从新手的视野来看,那么这个确实还蛮不错的,毕竟亚马逊云科技的EC2实例族太多了,用最优的实例,才会从性价比上得到优势。
那么就在此处用默认的一个选项 WebHost来看看Amazon Q的一个建议
image.png
image.png

比如说,咱们要考虑一个性价比,那么就是 “Price/Performance”
image.png

可以看到的是,推荐的几乎都是新的机型,比如M7、C7、T4g,正好也践行了亚马逊云科技推荐用户使用更新的服务的一个原则

故障排除

这块其实可以有几个案例,

  • 比如我们给定一个用户/角色,限制的权限,让它去执行已经被限制的操作
  • 官方示例,EC2服务器连不上的故障

因为时间比较紧,还是仅做EC2网络故障的难题,同时也加一点难度

EC2网络排障

预置一台EC2实例,该实例对应的安全组和路由表都有问题,看看Amazon Q能不能分析出来
image.png
image.png
image.png
image.png

提示安全组修复:那么我们就去将安全组修改为正常状态,再问Amazon Q

image.png
image.png
重问一遍,似乎只是建议我们去检查安全组,这边故意设置障碍“破坏了路由”,好像没有识别到

IDE集成对话

不知道啥时候Amazon Q就已经在我的VSCode中了,看官方的示例是我安装了AWS Toolkit,所以Amazon Q就自然而然地出现在了我的VSCode左侧的功能栏中了image.png

要使用Amazon Q,须登录Amazon Builder,才可在IDE中使用Amazon Q,同时,还可以描述咱们在VScode中编写的代码,讲述咱们的代码是干什么用的,对于最近兴起的“防御性代码”和"祖传屎山代码",我觉得是有不错的体验的,不在那么繁杂的去理解分析代码了
image.png

总结

总体体验下来,Amaon Q的表现中规中矩,对于亚马逊云科技的专业知识,确实是的十分熟悉

  • 触手可及,集成在平台、IDE中十分便捷
  • 专业性强,对于亚马逊云科技的专业知识回答的很精准
  • 代码好助手,结合Amazon CodeWhisperer,在编写代码的时候应该有奇效

期待改进之处

  • 网络故障排除应该更深层次,而非安全组的表象,网络本身就是一个很复杂的东西
  • 期待能够推出多语言版本,毕竟开发者的语言水平参差不齐

猜你喜欢

转载自blog.csdn.net/fly1574/article/details/134991074