huan9huan / prompts

to be a professional prompt engineer
2 stars 0 forks source link

AWS Doc GPT 的案例 #48

Open huan9huan opened 1 year ago

huan9huan commented 1 year ago

Goals

拆解 https://www.awsdocsgpt.com/ 的 search and answer

image

发现: System Prompt

You are a helpful and concise assistant that helps developers with their questions about the AWS documentation. 
                       In your responses, when you want to include a header, include it like: # [your header].
                       when you want to include a sub-header, include it like: ## [your subs-header].
                       when you want to include a piece of code, include it like: ```[your entire code bit]```.
                       MAKE SURE TO FORMAT ALL CODE CORRECTLY!!! INCLUDE PROPER INDENTING AND SPACING!!! 
                       For bold text, just render it like **bold text**. Render ordered/unordered lists in Markdown. 
                       For links, render as [link title](https://www.example.com).
                       Essentially just give your entire response as a Markdown document.

User Prompt

Please answer the following IMPORTANT PROMPT truthfully and as accurately as possible. 
                Use the following sources (which shall be denoted with a SOURCE TITLE and SOURCE CONTENT). 
                Try to not directly copy the sources word-for-word. Remember, you help developers with their questions 
                about the AWS documentation and TRY TO USE THE SOURCES AS CONTEXT to the best of your ability. However, you want to
                mainly focus on answering the user prompt. Do not randomly use the sources that have nothing to
                do with the question asked by the user. You do not have to explicity
                mention the source names and which sources you used in your answer.
                PLEASE MAKE THE RESPONSE A SHORT SHORT SHORT LENGTH THIS IS VERY IMPORTANT!!!
                If you are giving a SHORT or MEDIUM response, do not add a long response with [Answer] or an "Answer" heading. 
                Always try to keep track of your response length especially before you give the response.

                Here is the IMPORTANT PROMPT: most cheapest instance with public ip

 Here are the SOURCES: 

SOURCE TITLE: AWS \ Amazon EC2 Auto Scaling \ User Guide \ Get started with Amazon EC2 Auto Scaling
SOURCE CONTENT: On the Quick Start tab of the Choose an Amazon Machine Image page, note the ID of the AMI next to Amazon Linux 2 AMI (HVM) Notice that this AMI is marked "Free tier eligible." For Instance type, select a hardware configuration for your instance. If your account is less than 12 months old, you can use a t2.micro instance for free within certain usage limits. For more information, see AWS free tier. Under Additional configuration, for Advanced details, IP address type, make a selection. To provide internet connectivity to instances in a VPC, choose an option that assigns a public IP address. If an instance is launched into a default VPC, the default is to assign a public IP address. If you want to provide internet connectivity to your instance but aren't sure whether you have a default VPC, choose Assign a public IP address to every instance. For Security groups, choose an existing security group.SOURCE TITLE: AWS \ Amazon EC2 Auto Scaling \ User Guide \ Get started with Amazon EC2 Auto Scaling
SOURCE CONTENT: On the Quick Start tab of the Choose an Amazon Machine Image page, note the ID of the AMI next to Amazon Linux 2 AMI (HVM) Notice that this AMI is marked "Free tier eligible." For Instance type, select a hardware configuration for your instance. If your account is less than 12 months old, you can use a t2.micro instance for free within certain usage limits. For more information, see AWS free tier. Under Additional configuration, for Advanced details, IP address type, make a selection. To provide internet connectivity to instances in a VPC, choose an option that assigns a public IP address. If an instance is launched into a default VPC, the default is to assign a public IP address. If you want to provide internet connectivity to your instance but aren't sure whether you have a default VPC, choose Assign a public IP address to every instance. For Security groups, choose an existing security group.SOURCE TITLE: AWS \ Amazon EC2 \ API Reference \ Actions \ RunInstances
SOURCE CONTENT: ~~https://ec2.amazonaws.com/?Action=RunInstances&ImageId=ami-2a1fec43&MaxCount=1&MinCount=1&KeyName=my-key-pair&SubnetId=subnet-dea63cb7&Placement.Tenancy=dedicated&AUTHPARAMS~~ ^Example 5^ This request launches an instance into a nondefault subnet, and requests a public IPv4 address for a new network interface with the device index of 0 ~~https://ec2.amazonaws.com/?Action=RunInstances&ImageId=ami-1a2b3c4d&MaxCount=1&MinCount=1&NetworkInterface.1.DeviceIndex=0&NetworkInterface.1.AssociatePublicIpAddress=true&NetworkInterface.1.SubnetId=subnet-1a2b3c4d&AUTHPARAMS~~ ^Example 6^ This request launches an m1.large instance with a block device mapping.SOURCE TITLE: AWS \ AWS Security Hub \ User Guide \ Security controls and standards in AWS Security Hub \ Security Hub controls reference \ Amazon Elastic Compute Cloud controls
SOURCE CONTENT: For more information about IPv6, see IP addressing in your VPC in the Amazon VPC User Guide. If you have a legitimate use case to maintain EC2 instances with public IP addresses, then you can suppress the findings from this control. For more information about front-end architecture options, see the AWS Architecture Blog or the This Is My Architecture series. This control isn't supported in the following Regions: Asia Pacific (Hyderabad) Asia Pacific (Jakarta) Asia Pacific (Melbourne) Asia Pacific (Osaka) Europe (Spain) Europe (Zurich) ^Remediation^ Use a non-default VPC so that your instance is not assigned a public IP address by default. When you launch an EC2 instance into a default VPC, it is assigned a public IP address. When you launch an EC2 instance into a non-default VPC, the subnet configuration determines whether it receives a public IP address.SOURCE TITLE: AWS \ Amazon EC2 \ User Guide for Windows Instances \ Amazon EC2 instances \ Instance types \ Change the instance type \ Troubleshoot changing the instance type
SOURCE CONTENT: When you change the instance type, you must first stop the instance. When you stop an instance, we release the public IPv4 address and give your instance a new public IPv4 address. To retain the public IPv4 address between instance stops and starts, we recommend that you use an Elastic IP address, at no extra cost provided your instance is running. For more information, see Elastic IP addresses.