Langsung ke konten utama

How to Expose Aws S3 as Nuget Feed

Managing NuGet packages for .NET development can be a challenge. Tasks such as initial configuration, ongoing maintenance, and scaling inefficiencies are the biggest pain points for developers and organizations. With its addition of NuGet package support, AWS CodeArtifact now provides easy-to-configure and scalable package management for .NET developers. You can use NuGet packages stored in CodeArtifact in Visual Studio, allowing you to use the tools you already know.

In this post, we show how you can provision NuGet repositories in 5 minutes. Then we demonstrate how to consume packages from your new NuGet repositories, all while using .NET native tooling.

All relevant code for this post is available in the aws-codeartifact-samples GitHub repo.

Prerequisites

For this walkthrough, you should have the following prerequisites:

  • AWS Account
  • AWS Command Line Interface (AWS CLI). For instructions, see Installing, updating, and uninstalling the AWS CLI version 2
  • AWS Toolkit for Visual Studio
  • The latest version of NuGet. For instructions, see Install NuGet client tools
    • Alternatively, use .NET Core. For instructions, see Download .NET
  • Visual Studio IDE (Community, Professional or Enterprise)

Architecture overview

Two core resource types make up CodeArtifact: domains and repositories. Domains provide an easy way manage multiple repositories within an organization. Repositories store packages and their assets. You can connect repositories to other CodeArtifact repositories, or popular public package repositories such as nuget.org, using upstream and external connections. For more information about these concepts, see AWS CodeArtifact Concepts.

The following diagram illustrates this architecture.

AWS CodeArtifact core concepts

Figure: AWS CodeArtifact core concepts

Creating CodeArtifact resources with AWS CloudFormation

The AWS CloudFormation template provided in this post provisions three CodeArtifact resources: a domain, a team repository, and a shared repository. The team repository is configured to use the shared repository as an upstream repository, and the shared repository has an external connection to nuget.org.

The following diagram illustrates this architecture.

Example AWS CodeArtifact architecture

Figure: Example AWS CodeArtifact architecture

The following CloudFormation template used in this walkthrough:

          AWSTemplateFormatVersion: '2010-09-09' Description: AWS CodeArtifact resources for dotnet  Resources:   # Create Domain   ExampleDomain:     Type: AWS::CodeArtifact::Domain     Properties:       DomainName: example-domain       PermissionsPolicyDocument:         Version: 2012-10-17         Statement:           - Effect: Allow             Principal:               AWS:                - !Sub arn:aws:iam::${AWS::AccountId}:root             Resource: "*"             Action:               - codeartifact:CreateRepository               - codeartifact:DescribeDomain               - codeartifact:GetAuthorizationToken               - codeartifact:GetDomainPermissionsPolicy               - codeartifact:ListRepositoriesInDomain    # Create External Repository   MyExternalRepository:     Type: AWS::CodeArtifact::Repository     Condition: ProvisionNugetTeamAndUpstream     Properties:       DomainName: !GetAtt ExampleDomain.Name       RepositoryName: my-external-repository              ExternalConnections:         - public:nuget-org       PermissionsPolicyDocument:         Version: 2012-10-17         Statement:           - Effect: Allow             Principal:               AWS:                - !Sub arn:aws:iam::${AWS::AccountId}:root             Resource: "*"             Action:               - codeartifact:DescribePackageVersion               - codeartifact:DescribeRepository               - codeartifact:GetPackageVersionReadme               - codeartifact:GetRepositoryEndpoint               - codeartifact:ListPackageVersionAssets               - codeartifact:ListPackageVersionDependencies               - codeartifact:ListPackageVersions               - codeartifact:ListPackages               - codeartifact:PublishPackageVersion               - codeartifact:PutPackageMetadata               - codeartifact:ReadFromRepository    # Create Repository   MyTeamRepository:     Type: AWS::CodeArtifact::Repository     Properties:       DomainName: !GetAtt ExampleDomain.Name       RepositoryName: my-team-repository       Upstreams:         - !GetAtt MyExternalRepository.Name       PermissionsPolicyDocument:         Version: 2012-10-17         Statement:           - Effect: Allow             Principal:               AWS:                - !Sub arn:aws:iam::${AWS::AccountId}:root             Resource: "*"             Action:               - codeartifact:DescribePackageVersion               - codeartifact:DescribeRepository               - codeartifact:GetPackageVersionReadme               - codeartifact:GetRepositoryEndpoint               - codeartifact:ListPackageVersionAssets               - codeartifact:ListPackageVersionDependencies               - codeartifact:ListPackageVersions               - codeartifact:ListPackages               - codeartifact:PublishPackageVersion               - codeartifact:PutPackageMetadata               - codeartifact:ReadFromRepository        

Getting the CloudFormation template

To use the CloudFormation stack, we recommend you clone the following GitHub repo so you also have access to the example projects. See the following code:

          git clone https://github.com/aws-samples/aws-codeartifact-samples.git cd aws-codeartifact-samples/getting-started/dotnet/cloudformation/        

Alternatively, you can copy the previous template into a file on your local filesystem nameddeploy.yml.

Provisioning the CloudFormation stack

Now that you have a local copy of the template, you need to provision the resources using a CloudFormation stack. You can deploy the stack using the AWS CLI or on the AWS CloudFormation console.

To use the AWS CLI, enter the following code:

          aws cloudformation deploy \ --template-file deploy.yml \ --region <YOUR_PREFERRED_REGION> \ --stack-name CodeArtifact-GettingStarted-DotNet        

To use the AWS CloudFormation console, complete the following steps:

  1. On the AWS CloudFormation console, choose Create stack.
  2. Choose With new resources (standard).
  3. Select Upload a template file.
  4. Choose Choose file.
  5. Name the stack CodeArtifact-GettingStarted-DotNet.
  6. Continue to choose Next until prompted to create the stack.

Configuring your local development experience

We use the CodeArtifact credential provider to connect the Visual Studio IDE to a CodeArtifact repository. You need to download and install the AWS Toolkit for Visual Studio to configure the credential provider. The toolkit is an extension for Microsoft Visual Studio on Microsoft Windows that makes it easy to develop, debug, and deploy .NET applications to AWS. The credential provider automates fetching and refreshing the authentication token required to pull packages from CodeArtifact. For more information about the authentication process, see AWS CodeArtifact authentication and tokens.

To connect to a repository, you complete the following steps:

  1. Configure an account profile in the AWS Toolkit.
  2. Copy the source endpoint from the AWS Explorer.
  3. Set the NuGet package source as the source endpoint.
  4. Add packages for your project via your CodeArtifact repository.

Configuring an account profile in the AWS Toolkit

Before you can use the Toolkit for Visual Studio, you must provide a set of valid AWS credentials. In this step, we set up a profile that has access to interact with CodeArtifact. For instructions, see Providing AWS Credentials.

Visual Studio Toolkit for AWS Account Profile Setup

Figure: Visual Studio Toolkit for AWS Account Profile Setup

Copying the NuGet source endpoint

After you set up your profile, you can see your provisioned repositories.

  1. In the AWS Explorer pane, navigate to the repository you want to connect to.
  2. Choose your repository (right-click).
  3. Choose Copy NuGet Source Endpoint.

AWS CodeArtifact repositories shown in the AWS Explorer

Figure: AWS CodeArtifact repositories shown in the AWS Explorer

You use the source endpoint later to configure your NuGet package sources.

Setting the package source using the source endpoint

Now that you have your source endpoint, you can set up the NuGet package source.

  1. In Visual Studio, under Tools, choose Options.
  2. Choose NuGet Package Manager.
  3. Under Options, choose the + icon to add a package source.
  4. For Name , enter codeartifact.
  5. For Source, enter the source endpoint you copied from the previous step.

Configuring Nuget package sources for AWS CodeArtifact

Figure: Configuring NuGet package sources for AWS CodeArtifact

Adding packages via your CodeArtifact repository

After the package source is configured against your team repository, you can pull packages via the upstream connection to the shared repository.

  1. Choose Manage NuGet Packages for your project.
    • You can now see packages from nuget.org.
  2. Choose any package to add it to your project.

Exploring packages while connected to a AWS CodeArtifact repository

Exploring packages while connected to a AWS CodeArtifact repository

Viewing packages stored in your CodeArtifact team repository

Packages are stored in a repository you pull from, or referenced via the upstream connection. Because we're pulling packages from nuget.org through an external connection, you can see cached copies of those packages in your repository. To view the packages, navigate to your repository on the CodeArtifact console.

Packages stored in a AWS CodeArtifact repository

Packages stored in a AWS CodeArtifact repository

Cleaning Up

When you're finished with this walkthrough, you may want to remove any provisioned resources. To remove the resources that the CloudFormation template created, navigate to the stack on the AWS CloudFormation console and choose Delete Stack. It may take a few minutes to delete all provisioned resources.

After the resources are deleted, there are no more cleanup steps.

Conclusion

We have shown you how to set up CodeArtifact in minutes and easily integrate it with NuGet. You can build and push your package faster, from hours or days to minutes. You can also integrate CodeArtifact directly in your Visual Studio environment with four simple steps. With CodeArtifact repositories, you inherit the durability and security posture from the underlying storage of CodeArtifact for your packages.

As of November 2020, CodeArtifact is available in the following AWS Regions:

  • US: US East (Ohio), US East (N. Virginia), US West (Oregon)
  • AP: Asia Pacific (Mumbai), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo)
  • EU: Europe (Frankfurt), Europe (Ireland), Europe (Stockholm)

For an up-to-date list of Regions where CodeArtifact is available, see AWS CodeArtifact FAQ.

About the Authors

John Standish

John Standish is a Solutions Architect at AWS and spent over 13 years as a Microsoft .Net developer. Outside of work, he enjoys playing video games, cooking, and watching hockey.

Nuatu Tseggai

Nuatu Tseggai is a Cloud Infrastructure Architect at Amazon Web Services. He enjoys working with customers to design and build event-driven distributed systems that span multiple services.

Neha Gupta

Neha Gupta is a Solutions Architect at AWS and have 16 years of experience as a Database architect/ DBA. Apart from work, she's outdoorsy and loves to dance.

Elijah Batkoski

Elijah is a Technical Writer for Amazon Web Services. Elijah has produced technical documentation and blogs for a variety of tools and services, primarily focused around DevOps.

ouresseechivers.blogspot.com

Source: https://aws.amazon.com/blogs/devops/using-nuget-with-aws-codeartifact/

Komentar




banner



Popular Posts

164. 68.127.15 / Nonton 164 68 127 15 Dan 164 68 L27 15 Full Apk Japanese Ilmumu Com

164. 68.127.15 / Nonton 164 68 127 15 Dan 164 68 L27 15 Full Apk Japanese Ilmumu Com . Go to device settings, then security. How to install 164.68.127.15 on android? Pada kesempatan kali ini admin . As51167 contabo gmbh network information, ip address ranges and whois details. Find the.apk file on your phone's internal or external . As51167 contabo gmbh network information, ip address ranges and whois details. Find the.apk file on your phone's internal or external . How to install 164.68.127.15 on android? Pada kesempatan kali ini admin . Go to device settings, then security. 164 68 L27 15 182 164 68 L27 15 Archives Trendsterkini Don T Forget To Leave Your Rating And Comment To Help Us Improve Our Community Database from i0.wp.com Go to device settings, then security. As51167 contabo gmbh network information, ip address ranges and whois detai...

Yamaha 285Pe Inboard Motor Catalog Electric Cables / Electrical System Accessories (p. 42) - Sierra Marine ... / Bellmarine offers a wide range of electric inboard motor configurations, both direct drive shaft and reduction geared.

Yamaha 285Pe Inboard Motor Catalog Electric Cables / Electrical System Accessories (p. 42) - Sierra Marine ... / Bellmarine offers a wide range of electric inboard motor configurations, both direct drive shaft and reduction geared. . Bellmarine offers a wide range of electric inboard motor configurations, both direct drive shaft and reduction geared. Каталог запчастей mercruiser остальные r/mr/alpha one. Browse it online or download a pdf. With information about 150 electric inboard boat motors from 17 manufacturers, welcome to what we believe is the most complete guide to electric inboard motors. Alibaba.com offers 2,617 electric inboard motor products. The yamaha outboards catalog features all of our latest outboard power innovations, accessories and propellers. Yamaha 285pe inboard motor catalog electric cables / stratos pro elite bass boat boats for sale : Encuentra tu distribuidor más cercano. Boat warehouse has the parts you need. Browse all the yamaha inboard,...

Pelajar Berjilbab Ml - Jilbab Pelajar Pramuka Pacaran Lagi | Foto Bugil Bokep 2017

Pelajar Berjilbab Ml - Jilbab Pelajar Pramuka Pacaran Lagi | Foto Bugil Bokep 2017 . Video ml, tante aida maenin mertua. Ketahuan ml di dalam mobil. .wanita berjilbab…namun apa mau dikata nasi udah jadi bubur dan bubur itu udah di makan oleh aku neh…ada tetanggaku yg bernama ibu tiara, berjilbab umurnya sekitar 33 taon, anaknya dah 3. Akhirnya kami selesai ml dan kami memakai pakaian kami kembali. Dan saatnya mengantarkan asnah pulang kami sempat berciuman pada saat aku mengantar dia sampai depan rumahnya. Akhirnya kami selesai ml dan kami memakai pakaian kami kembali. Video ml, tante ida selingkuh. Cerita cinta gadis berjilbab ini ceritaku entah berapa bulan lalu ketika sore aku aku sedang menghabiskan waktu selepas bekerja disebuah mall dijakarta. Main kuda kudaan sama pacar. Bu sita aku memanggil selamat siang dok seorang perempuan datang menghampiri mejaku dan langsung duduk didepanku, wanita yang baru berumur 31 tahun. ...

Voorlichting Sexuale Full 1991 Biqle.ru : Liam En Sexuele Voorlichting 2010 From Sexuele Voorlichting Watch Video Mypornvid Fun

Voorlichting Sexuale Full 1991 Biqle.ru : Liam En Sexuele Voorlichting 2010 From Sexuele Voorlichting Watch Video Mypornvid Fun . Sexuele voorlichting (1991) full movie english | hielde daems, willem geyseghem, 28 апреля 2021 г. Watch sexuele voorlichting 1991 mp4 video for free , , video hd: Смотрите видео sexuelle voorlichting 1991 онлайн. We did not find results for: Voorlichting sexuale full 1991 é um livro que provavelmente é bastante procurado no momento. Belgium видео sexuele voorlichting 1991 канала rarefilmfinderdotcom. Quiz hoofdstuk 1 hoofdstuk 4 hoofdstuk 5 quizzzzzzzz hoofdstuk 6 zijn er nog vragen, tips of tops? Видео sexuele voorlichting 1991 канала rarefilmfinderdotcom. Video › * sexuele voorlichting (1991 ). Sexuele voorlichting (1991), upload, share, download and embed your videos. Liam En Sexuele Voorlichting 2010 From Sexuele Voorlichting Watch Video Mypornvid Fun from...

Si Jahat Kelinci : Link Si Jahat Lite Apk Si Jahat Yandex Si Jahat Film Linktree Full Bokeh Museum Thefilosofi Com / Dagingnya memiliki cita rasa yang enak, bertekstur empuk, bergizi dan rendah kolesterol.

Si Jahat Kelinci : Link Si Jahat Lite Apk Si Jahat Yandex Si Jahat Film Linktree Full Bokeh Museum Thefilosofi Com / Dagingnya memiliki cita rasa yang enak, bertekstur empuk, bergizi dan rendah kolesterol. . Pemberian nama tergantung pada daerah banyaknya spesies ini ditemukan. Kisah kelinci jahat, kelinci jahat ff, slaughter ff, kelinci jahat ff, grazy kelinci, sedih ff, pembuly ff, kisah bully ff kisah nyata ff, free. Si peternak / breeder menjual dengan standar kualitas si kelincinya bukn berdasrkan umur. Sebagian kelinci pada saat ini digunakan sebagai hewan peliharaan dan hewan pedaging. Secara umum, kelinci dibagi menjadi kelinci liar dan kelinci peliharaan atau hias. Gold s gym cycle trai. Anda sedang cari kandang kelinci? Si peternak / breeder menjual dengan standar kualitas si kelincinya bukn berdasrkan umur. Pemberian nama tergantung pada daerah banyaknya spesies ini ditemukan. Memelihara kelinci dijadikan sebagai salah satu hobi untuk anda yang memiliki ke...

Uc Browser 64 Download - Download Latest Uc Browser For Windows 7 64 Bit ~ Melo : The files continue to download in the background without interrupting other tasks.

Uc Browser 64 Download - Download Latest Uc Browser For Windows 7 64 Bit ~ Melo : The files continue to download in the background without interrupting other tasks. . There's also a speed dial at launch, which provides access to 'favorite' websites. Ucbrowser for desktop pc adds a lot of features you probably don't have so this is the perfect browser for someone who likes google chrome but wants more. Uc browser for pc download is a great version of browser for desktop devices. Uc browser comes with support for a wide range of extensions. Uc browser is licensed as freeware for pc or laptop with windows 32 bit and 64 bit operating system. Uc browser direct, free and safe download. Uc browser download offers everything you'd expect from a desktop or laptop browser. The files continue to download in the background without interrupting other tasks. Networks such as gprs and edge. If you need other versions of uc browser, please email us at help@id...

Download Alight Motion Pro : Tutorial memakai preset AM (ALIGHT MOTION PRO) - YouTube

Download Alight Motion Pro : Tutorial memakai preset AM (ALIGHT MOTION PRO) - YouTube . Today we will share with you 100% working alight motion pro mod apk. Alight motion is free to use, and you will not need to spend money but can still follow your passion. Download alright motion pro video & photo editing app guide is the best professional tubes editor and photo editor for android in 2020, photo editing and video creation never been easier than before. Mobapks.com always provide original apk's to our users. The best part is that it is completely free with no restrictions! You can download this premium apk which has no watermark from here. Download the alight motion pro apk from our website and you can easily access all the available features in the app without having to purchase subscriptions. Mobapks.com always provide original apk's to our users. Alight motion is free to use, and you will not need to spend money but can still follow your passion. Fre...

Will Oliver and Felicity Be Together Again

Fictional graphic symbol in a television serial Oliver Queen Arrowverse graphic symbol Stephen Amell in his costume during the first flavor. Photographed by Jack Rowand. First advent "Pilot" Arrow October 10, 2012 Last appearance "Fadeout" Arrow January 28, 2020 Based on ...

Sexuele Voirlichting - Sexuele Voorlichting 1991 Belgium ~ Sexuele Voorlichting ... / Sexuele voorlichting subtitles on new opensubtitles.com website (beta).

Sexuele Voirlichting - Sexuele Voorlichting 1991 Belgium ~ Sexuele Voorlichting ... / Sexuele voorlichting subtitles on new opensubtitles.com website (beta). . Sexuele voorlichting does not have any comments (yet). Sexuele voorlichting english subtitles (1991) 1cd srt. Quiz hoofdstuk 1 hoofdstuk 4 hoofdstuk 5 quizzzzzzzz. Nahrávejte, sdílejte a stahujte zdarma. Sexuele voorlichting subtitles on new opensubtitles.com website (beta). Uloz.to is the largest czech cloud storage. Torrent downloads » movies » sexuele voorlichting (1991 belgium) mp4. Sexuele voorlichting hoofdstuk 2 hoofdstuk 1: Nahrávejte, sdílejte a stahujte zdarma. Sexuele voorlichting 1991 3 out of 5 based on 3096 ratings. Sexuele Voorlichting 1991 : Strays (1991) - YouTube ... from i.ytimg.com This is sexuele voorlichting by devon rothschild the phoenix on vimeo, the home for high quali...

16Th Birthday Cakes : Sweet 16 Literally Cake 16 Birthday Cake Sweet 16 Birthday Cake - Today is a very special day because it is the day when i first.

16Th Birthday Cakes : Sweet 16 Literally Cake 16 Birthday Cake Sweet 16 Birthday Cake - Today is a very special day because it is the day when i first. . May your 16th birthday have an amazing shine! So it's deserve big celebration. On this day friends , family , best friends and relatives are you inner light sparkles with such brilliance. This 4″ and 6″ two tier cake serves approx 17 portions. Download or directly send your wishes using social buttons. By birthday wishes | july 1, 2019. Birthday cakes are often layer cakes with frosting served with small lit candles on top representing the celebrant's age. Boy 16th birthday 16 birthday cake birthday games sweet 16 birthday boy birthday parties birthday ideas celebration cakes birthday celebration sweet 16 for boys. Just get this beautiful 16th birthday cake with name and photo of the celebrant. Coffee cake with an expresso swiss meringue buttercream and just a dash of tia maria! ...
close