Working with Amazon CodeWhisperer by using AWS Cloud9

更新於 發佈於 閱讀時間約 5 分鐘


What is CodeWhisperer?

Amazon CodeWhisperer is a machine learning service that improves developer productivity by generating code suggestions based on their natural language comments and code in their IDE.

CodeWhisperer supports programming languages such as Java, JavaScript, Python, C#, and TypeScript, and also supports code generation for Ruby, Go, PHP, C++, C, Shell, Scala, Rust, Kotlin, and SQL. The service integrates with several integrated development environments (IDEs), including JetBrains (IntelliJ, PyCharm, WebStorm, and Rider), Visual Studio Code, AWS Cloud9, and AWS Lambda Console.


Setting up


AWS IAM CodeWhisperer permissions for AWS Cloud9

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "CodeWhispererPermissions",
"Effect": "Allow",
"Action": ["codewhisperer:GenerateRecommendations"],
"Resource": "*"
}
]
}


Activating Amazon CodeWhisperer with AWS Cloud9

From inside your existing AWS Cloud9 environment, choose the AWS logo on the left edge of the window. A panel will expand rightward.

raw-image

In the lower part of the panel, under Developer tools, open the CodeWhisperer dropdown.

raw-image

Choose Enable CodeWhisperer.


Enter your description :# add two numbers in the python

raw-image

It will give you tips on what to do.

raw-image
raw-image

Bubble Sort

raw-image


All in all, CodeWhisperer is a powerful AI coding companion that helps developers build applications faster and more securely.


Security scans

CodeWhisperer offers a valuable Security Scan feature for your project files. It enhances application resilience by identifying security concerns like cross-site scripting vulnerabilities, log injections, weak file permissions, and hardcoded credentials. This security scan seamlessly integrates with CodeGuru, which applies multiple layers of filtering to prioritize critical issues. CodeGuru filters unsupported languages and conducts preliminary code testing, even for open source code, before initiating security scans.

raw-image


Next article Using Amazon CodeGuru Security to find out if code is vulnerable


Reference

https://aws.amazon.com/tw/codewhisperer/

https://docs.aws.amazon.com/codewhisperer/latest/userguide/cloud9-setup.html

留言
avatar-img
留言分享你的想法!
avatar-img
西尼亞ming的沙龍
16會員
80內容數
西尼亞ming的沙龍的其他內容
2024/11/05
在ops-agent當中可以安裝 JVM 來收集 Java 參數,該工具主要收集 memory 以及 garbage collection 的參數,其中監控的選項有包含以下: jvm.classes.loaded jvm.gc.collections.count jvm.gc.collec
2024/11/05
在ops-agent當中可以安裝 JVM 來收集 Java 參數,該工具主要收集 memory 以及 garbage collection 的參數,其中監控的選項有包含以下: jvm.classes.loaded jvm.gc.collections.count jvm.gc.collec
2024/11/05
**Google Cloud 操作與 Audit Logs 說明** Google Cloud 作為純雲端服務提供商,所有操作均透過 HTTPS 網頁或 API 呼叫完成,並無「登入專案」的行為紀錄。不過,若使用 Google Workspace 管理使用者身份,則可以透過 Google
2024/11/05
**Google Cloud 操作與 Audit Logs 說明** Google Cloud 作為純雲端服務提供商,所有操作均透過 HTTPS 網頁或 API 呼叫完成,並無「登入專案」的行為紀錄。不過,若使用 Google Workspace 管理使用者身份,則可以透過 Google
2024/11/05
使用 Storage Transfer 服務是否能降低成本? Storage Transfer 的計價方式針對從 Cloud Storage 轉移至 Cloud Storage,除了一般費用外,Storage 移轉服務會使用 Cloud Storage rewrite 作業在 Cloud
2024/11/05
使用 Storage Transfer 服務是否能降低成本? Storage Transfer 的計價方式針對從 Cloud Storage 轉移至 Cloud Storage,除了一般費用外,Storage 移轉服務會使用 Cloud Storage rewrite 作業在 Cloud
看更多
你可能也想看
Thumbnail
「欸!這是在哪裡買的?求連結 🥺」 誰叫你太有品味,一發就讓大家跟著剁手手? 讓你回購再回購的生活好物,是時候該介紹出場了吧! 「開箱你的美好生活」現正召喚各路好物的開箱使者 🤩
Thumbnail
「欸!這是在哪裡買的?求連結 🥺」 誰叫你太有品味,一發就讓大家跟著剁手手? 讓你回購再回購的生活好物,是時候該介紹出場了吧! 「開箱你的美好生活」現正召喚各路好物的開箱使者 🤩
Thumbnail
對 AWS Certified Cloud Practitioner 證照考試難度的看法、學習方法和考試內容的介紹。
Thumbnail
對 AWS Certified Cloud Practitioner 證照考試難度的看法、學習方法和考試內容的介紹。
Thumbnail
在沒有分環境之前,每一隻lambda只有一個code console給所有人一起編輯,開發好了就deploy,根據設定的trigger觸發執行。 現在我們希望能夠在code console開發,然後deploy到不同的stage,目標是不同stage的api gateway能夠調用該lambda的
Thumbnail
在沒有分環境之前,每一隻lambda只有一個code console給所有人一起編輯,開發好了就deploy,根據設定的trigger觸發執行。 現在我們希望能夠在code console開發,然後deploy到不同的stage,目標是不同stage的api gateway能夠調用該lambda的
Thumbnail
該服務透過記錄在AWS控制台上執行的操作並產生範例程式碼來實現 Infrastructure as Code (IaC) 目前僅在 us-east-1 的 EC2 控制台上可用 支援的格式: CDK(Java) CDK(Python) CDK(TypeScript) CloudFor
Thumbnail
該服務透過記錄在AWS控制台上執行的操作並產生範例程式碼來實現 Infrastructure as Code (IaC) 目前僅在 us-east-1 的 EC2 控制台上可用 支援的格式: CDK(Java) CDK(Python) CDK(TypeScript) CloudFor
Thumbnail
在開始前,請先至 GitHub 上 Clone 相關資源到環境裡。 $ git clone https://github.com/ml-explore/mlx-examples.git 完成後,進入資料夾 $ cd ./mlx-examples/whisper​ 裡面有以下資源: # wh
Thumbnail
在開始前,請先至 GitHub 上 Clone 相關資源到環境裡。 $ git clone https://github.com/ml-explore/mlx-examples.git 完成後,進入資料夾 $ cd ./mlx-examples/whisper​ 裡面有以下資源: # wh
Thumbnail
從 JavaScript 到 Python
Thumbnail
從 JavaScript 到 Python
Thumbnail
最近看到一些網路教學AWS S3可以部署靜態網頁,就想說那不如試試看將local swagger部署上去,之後還可以透過github action 自動部署swagger到s3上,於是花點時間看個影片並搭配chatgpt來實現
Thumbnail
最近看到一些網路教學AWS S3可以部署靜態網頁,就想說那不如試試看將local swagger部署上去,之後還可以透過github action 自動部署swagger到s3上,於是花點時間看個影片並搭配chatgpt來實現
Thumbnail
What is CodeWhisperer? Amazon CodeWhisperer is a machine learning service that improves developer productivity by generating code suggestions based
Thumbnail
What is CodeWhisperer? Amazon CodeWhisperer is a machine learning service that improves developer productivity by generating code suggestions based
追蹤感興趣的內容從 Google News 追蹤更多 vocus 的最新精選內容追蹤 Google News