aws-sdk-go-v2
is the v2 AWS SDK for the Go programming language.
The v2 SDK requires a minimum version of Go 1.15
.
Checkout out the release notes for information about the latest bugfixes, updates, and features added to the SDK.
Jump To:
For information about maintenance and support for SDK major versions and their underlying dependencies, see thefollowing in the AWS SDKs and Tools Shared Configuration and Credentials Reference Guide:
To get started working with the SDK setup your project for Go modules, and retrieve the SDK dependencies with go get
.This example shows how you can use the v2 SDK to make an API request using the SDK's Amazon DynamoDB client.
$ mkdir ~/helloaws
$ cd ~/helloaws
$ go mod init helloaws
$ go get github.com/aws/aws-sdk-go-v2/aws
$ go get github.com/aws/aws-sdk-go-v2/config
$ go get github.com/aws/aws-sdk-go-v2/service/dynamodb
In your preferred editor add the following content to main.go
package main
import (
"context"
"fmt"
"log"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/dynamodb"
)
func main() {
// Using the SDK's default configuration, loading additional config
// and credentials values from the environment variables, shared
// credentials, and shared configuration files
cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion("us-west-2"))
if err != nil {
log.Fatalf("unable to load SDK config, %v", err)
}
// Using the Config value, create the DynamoDB client
svc := dynamodb.NewFromConfig(cfg)
// Build the request with its input parameters
resp, err := svc.ListTables(context.TODO(), &dynamodb.ListTablesInput{
Limit: aws.Int32(5),
})
if err != nil {
log.Fatalf("failed to list tables, %v", err)
}
fmt.Println("Tables:")
for _, tableName := range resp.TableNames {
fmt.Println(tableName)
}
}
$ go run .
Table:
tableOne
tableTwo
Please use these community resources for getting help. We use the GitHub issuesfor tracking bugs and feature requests.
aws-sdk-go
tag.This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the Amazon Web Services Discussion Forums.
If you encounter a bug with the AWS SDK for Go we would like to hear about it.Search the existing issues and seeif others are also experiencing the issue before opening a new issue. Pleaseinclude the version of AWS SDK for Go, Go language, and OS you’re using. Pleasealso include reproduction case when appropriate.
The GitHub issues are intended for bug reports and feature requests. For helpand questions with using AWS SDK for Go please make use of the resources listedin the Getting Help section.Keeping the list of open issues lean will help us respond in a timely manner.
The v2 SDK will use GitHub Issues to track feature requests and issues with the SDK. In addition, we'll use GitHub Projects to track large tasks spanning multiple pull requests, such as refactoring the SDK's internal request lifecycle. You can provide feedback to us in several ways.
GitHub issues. To provide feedback or report bugs, file GitHub Issues on the SDK. This is the preferred mechanism to give feedback so that other users can engage in the conversation, +1 issues, etc. Issues you open will be evaluated, and included in our roadmap for the GA launch.
Contributing. You can open pull requests for fixes or additions to the AWS SDK for Go 2.0. All pull requests must be submitted under the Apache 2.0 license and will be reviewed by an SDK team member before being merged in. Accompanying unit tests, where possible, are appreciated.
SDK Developer Guide - Use this document to learn how to get started anduse the AWS SDK for Go V2.
SDK API Reference Documentation - Use thisdocument to look up all API operation input and output parameters for AWSservices supported by the SDK. The API reference also includes documentation ofthe SDK, and examples how to using the SDK, service client API operations, andAPI operation require parameters.
Service Documentation - Use thisdocumentation to learn how to interface with AWS services. These guides aregreat for getting started with a service, or when looking for moreinformation about a service. While this document is not required for coding,services may supply helpful samples to look out for.
Forum - Ask questions, get help, and give feedback
Issues - Report issues, submit pull requests, and get involved(see Apache 2.0 License)
刚刚接触go语言,从github上get包就成了一个大坑 使用: go get github.com/xxxx/xxxx 获取包时 先是没响应,然后告诉 (https fetch: Get xxxxxxx: dial tcp: i/o timeout) 网上解决方案有很多 这里使用手动下载 虽然麻烦但是适用 先看看你要的包是啥样子: github.com/${PATH1} ① golan
package main import ( "context" "fmt" "log" "os" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/feature/s3/manager
go get gopkg.in/yaml.v2超时,发现被墙了,解决办法如下: 1、安装golang.org/x/net $ mkdir -p $GOPATH/src/golang.org/x/ $ git clone https://github.com/golang/net.git $GOPATH/src/golang.org/x/net $ go install net 2、安装gopkg.
将Webpack设置到项目中以进行最终生成,因为它不会在S3上运行NPM启动脚本。 因此,使用Webpack构建您的项目。 它将捆绑您的项目,并为您提供3-4 JS文件和一个HTML文件,这些文件已准备部署到S3上。 在S属性中,有静态Web托管选项-将其配置为提供您的landing index.html文件 就这样你完成了 转载于:https://www.cnblogs.com/gamecent
AWS SDK for Go 是 Go 语言版本的 AWS SDK,是亚马逊 Web 服务 API 的客户端开发包,支持所有 AWS 服务。 示例代码: import "github.com/awslabs/aws-sdk-go/aws"import "github.com/awslabs/aws-sdk-go/gen/ec2"creds := aws.Creds(accessKey, secre
设置 你可以用全局方法配置连接: Aws.config.update( endpoint: 'https://objects.dreamhost.com.', access_key_id: 'my-access-key', secret_access_key: 'my-secret-key', force_path_style: tr
baidubce-sdk-go baidubce-sdk-go 是非官方百度云API的Go语言SDK。目前提供了BOS(百度云对象存储)Go SDK。简化了API调用。 安装 go get github.com/guoyao/baidubce-sdk-go/... 范例 func CreateBucket() { bucketName := "baidubce-sdk-go" err
PayPal-Go-SDK 是一个非 PayPal 官方的 Go 语言客户端开发包。 示例代码: import "github.com/logpacker/PayPal-Go-SDK"// ...// Create a client instancec, err := paypalsdk.NewClient("clientID", "secretID", paypalsdk.APIBaseSand
WeChat SDK for Go WeChat SDK 是一个Golang版本微信SDK,简单、易用。 快速开始 以下是一个处理消息接收以及回复的例子: //使用memcache保存access_token,也可选择redis或自定义cachewc := wechat.NewWechat()memory := cache.NewMemory()cfg := &offConfig.Config{
aws-sdk-perl Attempt to build a complete AWS SDK in Perl This project is attempting to build an entire AWS SDK from the informationthat is stored in other AWS SDKs. Other AWS SDKs have a "data-driven"